Tableau tips: Tableau calendar heat map
Updated: May 17, 2021
Calendar heat maps is one of the powerful charts for illustrating activity over a long period of time, such as months or years. A powerful viz when you need to show yearly events – enabling users spot different trends that might have taken place.
The chart resembles a normal yearly calendar with a small difference – a dimension (usually an aggregated value) is added and encoded with color to show the trends across the year – depicted by variation in color intensity. More dimensions can also be added through the tooltip – viz in the tooltip.
How can I create a heat map calendar in Tableau?
I will be using Superstores data to show you how to create a heat map calendar in Tableau. The goal is to show the number of customers who shopped at Superstores aggregated at day level and – presented as a calendar that can be filtered for different years.
Once connected to the above data set;
Drag dimension field ‘Order Date’ to the columns shelf & select ‘Weekday’ from discrete date parts.
Drag dimension field ‘Order Date’ to the rows shelf and select ‘Week’ from discrete date parts.
Format the field ‘Weekday’ to use abbreviations instead of full name.
Drag dimension field CNT(Customer ID) to the ‘color’ shelf.
Add a ‘Year’ filter – and select a single year ‘2015’
Drag dimension ‘Order Date’ to the label & select ‘Day’ from discrete date parts.
Change the Marks card from ‘Automatic’ to ‘Square’
Editing color, we’ve.
Note: We have full year calendar presented as a single column. Meaning to interact with this viz, you will need to use the vertical scrollbars and reference the week number too. Instead of this, we would like to have this viz structured as a normal calendar – having four rows indicating different quarters of the year.
To do this, first create a field to separate this view into three columns.
Drag this field ‘Column separator’ from measures to dimension area.
Next, drag it to the columns shelf right before WEEKDAY(Order Date)
Next, create a calculation ‘Week index’ to set week numbers between 0 & 5 at month level. To do this, we’ll use a level of detail (LOD) expression as follows;
This calculation looks the week number at visualization level and subtracts the minimum week number at month level.
Drag the field ‘Week index’ from the measures to the dimension area.
Replace the field WEEK(Order Date) on the rows shelf with ‘Week index’.
Next, drag dimension field ‘Order Date’ to the rows shelf and select ‘Quarter’ from the discrete date parts.
Now lets fine tune our view by the following;
Hiding the headers for both ‘Week index’ and ‘Column separator’
Choosing the right fonts for the labels.
Adding any additional details on the tooltip.
And there we’ve it.
I hope this was helpful to you. To receive more of these Tableau tips and tricks kindly join our mailing list by subscribing below.
Thank you for reading.