Sometimes, Highlight Tables are confused with Heat Maps. A Heat Map is a table that uses colors across two axes. A Highlight Table also uses colors to emphasize values, but the difference is that it has text inside the cells.
Tableau has a great article here that explains different use cases for both charts. They advise that heat maps displays trends, such as popular schedule times. For example, a busy restaurant might use a heat map to identify peak times during the day. They recommend using a Highlight Table for metrics like revenue and loss.
Tableau has the pre-attentive attribute of Size added to their Heat Map design in Show Me, as shown below:
The size of the squares shown here represent the number of customers for the day of the week. The darker, larger squares indicate more customers purchased something on that day.
Now, let's move on to Highlight Tables. Below is an example of Profit from the Sample Superstore data set for two years of data. Does this look like a popular ask from a client?
One issue with table views is that Tableau renders each cell individually. Tableau also performs better with rows of data versus columns of data. Additionally, this table has a very broad range of colors. How many cells can you focus on? What is this table telling us?
I would recommend doing a different chart view. If your client absolutely wants a table view, there are ways to change the view so the client isn't spending longer than needed to get to the data.
I created the chart below, containing the latest year of data. It has a lot less cells for the client to view!
My reasoning behind this view: I wanted to change the user's focus to the negative profit percentage changes from the prior year. I highlighted those in red. I also added the prior year calculation in the cell's tooltip. Additionally, I added a down arrow, which isn't really necessary since the cell is highlighted a light red. Any cells over 100% are a light grey.
This chart is also dynamic with the calculations. If the data is ever updated, it will always display the data for the current year.
How I created this chart:
I placed Order Date on the Columns shelf and changed it to Discrete Month.
I moved Sub-Category to the Rows shelf.
I created the following calculated fields:
Latest Date
{ Fixed : MAX([Order Date]) }
Latest Year
DATE(DATETRUNC('year',[Latest Date]))
Previous Year
DATE(DATETRUNC('year',[Latest Date]))-1
The above calculated fields point Tableau to the Date in time.
Profit CY
IF DATEPART('year',[Order Date]) = DATEPART('year',[Latest Year])
then [Profit]
END
Profit PY
IF DATEPART('year',[Order Date]) = DATEPART('year',[Previous Year])
then [Profit]
END
Profit CY - PY % Diff
(SUm([Profit CY])-SUM([Profit PY]))/SUM([Profit PY])
The above calculations will only pull Profit for the current year, Profit for the Prior year and then calculate the percentage change for these values.
I then created an inline calculated field of min(1) on the Columns shelf after the Month(Order Date) pill. This will change every cell to a bar.
I then right-clicked on the bottom axis and selected Edit Axis. I fixed the range to have a max end of 1.
I then placed Profit CY on the Label marks card and made it center aligned.
I put Profit PY on the Tooltip.
I changed the view to Entire View.
I put Profit CY - PY % Diff on the Label Marks card.
Next I wanted to create a calculated field that draws your clients eye to the drop in Profit percentage.
Profit Highlight
IF [Profit CY - PY % Diff] > 1 then '100%+'
elseif [Profit CY - PY % Diff] > 0 THEN '0%+'
ELSEIF [Profit CY - PY % Diff] <0 then '<0%'
ELSE NULL
end
I placed this calculated field on the Color Marks card.
I made NULL and the 0%+ values white.
I changed 100%+ to a light grey.
I changed <0% a light pink.
I abbreviated the month labels.
I also hid the bottom axis.
If you wish to add the down arrow to Profit CY - PY % Diff calculated field, I formatted the value as shown below. You can get the down arrow or any up arrows from Windows Character Map application.
I chose to only have the arrow for the percent decreases to further emphasize my values. This isn't necessary, as the light pink will focus the user's eye on it. If I had arrows for both the positive and negative values, it would be too much visually. I included a past blog link below if you wish to learn how to use Window's Character map.
If you wish to download my Tableau Public workbook with this table hack in it, it is located here.
Comments