Coloring in tables, cross tables, and heat maps
For tables, cross tables, and heat maps coloring is always configured using color scheme groupings. A color scheme grouping functions as a container for one or more axis values on which you want to apply the same color scheme. In tables and cross tables, coloring can be applied either to the background of the cells, or the cell text.
Before you begin
Procedure
Coloring in tables
The image below shows a table with two different color schemes applied to it.
The color schemes are separated by a horizontal line in the legend. The upper color scheme in the legend contains the two columns Category and Type, both containing string values. The lower color scheme in the legend contains the two columns Sales and Cost, both containing numeric values. The columns Year and Month are not included in any color scheme grouping. The image below shows the Colors page of the Visualization Properties dialog for the table above.
In the upper part of the dialog, the color scheme grouping "Cost and Sales" is selected, and in the lower part of the dialog, its corresponding color scheme is shown. The color scheme is in gradient color mode. The two columns share the same color scheme, but the scaling is separate for them. This means that the three color points Min, Average, and Max are calculated per column. If you want to use a common scale for the columns in the grouping, select the alternative (None) in the One scale per drop-down list. To see the scale for a column in the color scheme grouping, select it in the Color scheme groupings list. If the grouping itself is selected, as in the example, then the scale for the first column in the grouping is shown.
Coloring in cross tables and heat maps – One color scheme grouping
Example (one color scheme grouping):
The cross table below shows the sum of sales (Sum(Sales)) for fruits and vegetables for the years 2021, 2022, and 2023. The horizontal axis has the two columns Category and Type. The column Category contains the two axis values Fruit and Vegetables, and the column Type contains the values Apples, Bananas, Pears, Cucumber, Lettuce, and Tomatoes. The cross table is colored by the column Category.
When you create a new cross table, one color scheme grouping (named Numeric) is created for each column represented on an axis in the cross table. The default grouping contains all the axis values in that column. Select a column in the Color by drop-down list to see its default color scheme grouping. In the example below, a part of the Colors page of the Cross Table Properties dialog is shown. The column Category was selected in the Color by drop-down list and its default color scheme grouping is shown, as well as its two axis values Fruit and Vegetables.
In the lower part of the dialog, the color scheme for the Numeric color scheme grouping is shown. The color scheme is in Gradient color mode. The two axis values Fruit and Vegetables share the same color scheme, but the scaling is separate for them. This means that the three color points, Min, Average, and Max, are calculated per axis value. If you want to use a common scale for the axis values in the grouping, select the alternative (None) in the One scale per drop-down list. To see the scale for a column in the color scheme grouping, select it in the Color scheme groupings list. If the grouping itself is selected, as in the example, then the scale for the first column in the grouping is shown.
Coloring in cross tables and heat maps – Separate color scheme grouping
The example below shows a cross table with the same setup as in the example above except for the coloring. This cross table is colored by the column Type, and has two different color schemes applied to it.
The color schemes are separated by a horizontal line in the legend. The image below shows the Colors page of the Visualization Properties dialog for this cross table.
As can be seen in the upper part of the dialog, two color scheme groupings have been added. The first grouping is named Fruits, and the three axis values, Apples, Bananas, and Pears, have been added to that grouping. This is also the color scheme shown first in the legend above. The second grouping is named Vegetables, and it contains the axis values Cucumber, Lettuce, and Tomatoes. The Numeric color scheme grouping is empty because all the axis values in the column Type have been added to either of the two new groupings. The default grouping cannot be deleted from the list of groupings. If you delete a grouping that you have added, then the axis values in that grouping will automatically be moved to the default grouping instead. Any added groupings will be shown in the list even if you change to another column to color by. The example below shows the Color scheme groupings list when the Color by column is set to Year.
The two groupings Fruits and Vegetables are still visible, but you cannot expand them unless you change Color by back to the column Type.
Color scheme based on another expression in a cross table
Typically the color schemes for groupings in a cross table are based on the actual values that are shown in the cross table cells. However, it is possible to let a color scheme for a grouping reflect another column or expression than the one used for calculating the cell values.
To illustrate this possibility, the data below is used. The 'Budget' column shows estimated monthly figures, and the 'Actual' column the outcomes. The bar chart shows that the budget was exceeded in Q3.
Below the 'Actual' totals per quarter are shown in a cross table.
Assume quarters that exceed the budget should be distinguished in this cross table. By selecting Color the grouping using another expression, you can use another expression for coloring the selected color scheme grouping. In this example, the expression 'Sum([Budget] - [Actual])' is used, which returns a negative result if the budget is exceeded. A color rule is added that applies a red cell background, if the result of the expression is less than 0.
These settings will draw the attention to the exceeded budget in Q3.
Color scheme groupings in heat maps
Coloring in heat maps works the same way as in cross tables. The example below shows a heat map where the Y-axis is set to the column Test, while the X-axis is set to (None). The individual cell values show the average of the three columns, Time 1, Time 2, and Time 3.