Sigma Computing is a great business intelligence platform that utilizes live connections to cloud data sources, like Snowflake, to bring insights to the forefront of your business. While Sigma can make columnar tables, pivot tables, and various data visualizations with only a few clicks, one thing Sigma really excels at is conditional formatting.
Conditional formatting can be used to show high or low values, to show variance, or in Sigma, it can be used to add a small visualization within the cell itself. In this blog, we’ll go over how to implement conditional formatting in your tables in Sigma.
How to Use Conditional Formatting in Sigma
To use conditional formatting in Sigma, you must first connect to a data source in your Sigma instance. For example, you can review how to connect to Snowflake in Sigma here. Once you have your data connection, you can click the ‘+’ sign at the top left of the screen in Sigma to create a new element. By clicking the ‘+’ sign, you’ll have a few options of elements you can add, but for this example, we will create a table. Note that the conditional formatting option this blog goes over can be used for both tables and pivot tables.
In this example, I will only pull in a few columns for simplicity. Below, I included a few columns (and calculations) like Order Number, Date, SKU Number, and cost, among others.
From here, you can click on the down arrow next to any column and select ‘Conditional Formatting.’ One of the great things about Sigma is that conditional formatting is a built-in feature. There isn’t a need to use hacks or tricks to work around making a table and creating multiple calculations just to format something a different color. By using this selection, you can do quite a bit of conditional formatting.
Once you select ‘Conditional Formatting,’ you will see this screen.
To go over the options:
- Rules: This is where you can apply one or more rules to a column or table for conditional formatting. You create a rule, apply it to the table, and then you are able to create another one if you’d like.
- Cost: This shows as [Cost] simply because this is the column I selected for conditional formatting. It’s showing the ‘123′ next to it because this column is an integer data type.
- Apply To: This is where you can select one column, multiple columns. A new feature is that you can now select ‘All Columns’ in this drop down to apply the formatting to all columns in your table. One thing to note is that the selections here are limited to the columns in the table you are using; you cannot select a column from your base table if you did not include it in the data element you created.
- Single Color/Color Scale/Data Bars: This allows you to select a single color to highlight a column, select a color scale to show variance or differences in a column, or data bars to add a small bar to each value to have another way of quickly visualizing the number.
- Formatting Rule: This allows you to dictate the formatting rule you want to use. You can select ‘is equal’ to specify a specific value to highlight, or you can select ‘greater than’ to highlight numbers that are above a value you select. Further, you can also use conditional formatting on a string column by using the text options or even add your own custom formula.
- Style: This allows you to select your font color and background color.
- Format: This allows you to format the number as a percentage, currency, financial notation, etc.
- Delete Rule: Last, this simply allows you to delete your rule if you don’t want to apply this rule.
Now that we’ve gone over a brief overview let’s go over how you can use conditional formatting in a table.
Conditional Formatting Examples
The table below is extremely simple and just uses the ‘Single Color’ option to format the [Cost] column. This is useful if you want to highlight a single column for a presentation or if this is the most important metric in your table. I used the ‘greater than’ formatting rule to only highlight the cells that are greater than $100 for [Cost]. I used the paint bucket to select the color.
In this next example, I applied the ‘Color Scale’ option to format the [Revenue] and [Profit] columns. I selected a color scale and clicked the ‘customize domain’ slider to be able to dictate the minimum, middle, and maximum value. This can be very useful if there are particular values that your business looks for or if you want to not include values below a certain number.
Finally, I used the ‘Data Bars’ option to create a set of bars in a table. To do this, I simply duplicated the [Revenue] column, renamed the column to ‘Revenue Bar’, and applied the ‘data bars’ conditional formatting to the [Revenue Bar] column. I customized the domain to view the bars with a maximum of 1000 to see how the row-level revenue numbers scale against one another. I selected left alignment and ticked the ‘Show Data Bars Only’ box to remove the numbers since we already show them in the [Revenue] column.
Additionally, I added another rule to the [COGS] column using a custom formula. This formula uses CONTAINS() on [SKU Number] to highlight values in the [COGS] column if a value in the [SKU Number] column contains (in this example) the string “CT.”
Keep in mind if you right-click on a column and select ‘Conditional Formatting,’ you will see your list of rules applied to your table. You can expand or collapse these rules to edit them, and if you don’t want to apply the formatting, you may select ‘Delete’ to remove this from your table. If you delete this erroneously, you can always hit the undo button to bring back your formatting.
As you can see, conditional formatting in Sigma is extremely user-friendly and very robust. You can highlight entire columns, multiple columns, select a color scale to apply to columns, add data bars for another way to view your data, and use custom formulas to even reference other columns in your formatting. Sigma makes it easy to use with their Conditional Formatting section to add and remove rules and edit them on the fly.
Click the link below to try your own free trial of Sigma Computing. Sigma offers lightning quick query times with the help of cloud data warehouses like Snowflake. See what Sigma can do for your organization at the link below.
Absolutely. Sigma has a few formatting rules you can select that involve string values like ‘Text contains’ or ‘Text does not contain.’ Simply denote what text value you want to include or not include in your formatting, and you’re on your way to a beautifully formatted table.
Probably! Sigma releases new features almost every day and has major releases very often. In recent months, Sigma has added a few new features for conditional formatting, like the ability to select all columns. More features are released all the time.
Pro Tip #1: You can use a custom formula to conditionally format your columns or tables. Simply select ‘Custom Formula’ under ‘Formatting Rules’ and type in your formula there.
Pro Tip #2: You can easily create a heatmap in this way. If you have a table that shows sales by region by month, for example, you can apply the formatting to all columns to easily create a heatmap.