Build a Highlight Table
Use highlight tables to compare categorical data using colour.
In Tableau, you create a highlight table by placing one or more dimensions on the Columns shelf and one or more dimensions on the Rows shelf. You then select Square as the mark type and place a measure of interest on the Colour shelf.
You can enhance this basic highlight table by setting the size and shape of the table cells.
To create a highlight table to explore how profit varies across regions, product sub-categories, and customer segments, follow these steps:
Connect to the Sample - Superstore data source.
Drag the Segment dimension to Columns.
Tableau creates headers with labels derived from the dimension member names.
Drag the Region and Sub-Category dimensions to Rows, dropping Sub-Category to the right of Region.
Now you have a nested table of categorical data (that is, the Sub-Category dimension is nested within the Region dimension).
Drag the Profit measure to Colour on the Marks card.
Tableau aggregates the measure as a sum. The colour legend reflects the continuous data range.
In this view, you can see data for only the Central region. Scroll down to see data for other regions.
In the Central region, copiers are shown to be the most profitable sub-category, and binders and appliances the least profitable.
Click Colour on the Marks card to display configuration options. In the Border drop-down list, select a medium grey colour for cell borders, as in the following image:
Now it's easier to see the individual cells in the view:
The default colour palette is Orange-Blue Diverging. A Red-Green Diverging palette might be more appropriate for profit. To change the colour palette and to make the colours more distinct, do the following:
Hover over the SUM(Profit) colour legend, then click the drop-down arrow that appears and select Edit Colours.
In the Edit Colours dialog box, in the Palette field, select Red-Green Diverging from the drop-down list.
Select the Use Full Colour Range tick box and click Apply and then click OK.
When you select this option, Tableau assigns the starting number a full intensity and the ending number a full intensity. If the range is from -10 to 100, the colour representing negative numbers changes in shade much more quickly than the colour representing positive numbers.
When you do not select Use Full Colour Range, Tableau assigns the colour intensity as if the range was from -100 to 100, so that the change in shade is the same on both sides of zero. The effect is to make the colour contrasts in your view much more distinct.
For more information about colour options, see Colour Palettes and Effects.
Drag the Sales measure to Size on the Marks card to control the size of the boxes by the Sales measure. You can compare absolute sales numbers (by size of the boxes) and profit (by colour).
Initially, the marks look like this:
To enlarge the marks, click Size on the Marks card to display a size slider:
Drag the slider to the right until the boxes in the view are the optimal size. Now your view is complete:
Check your work! Watch steps 1-9 below: