How To Create a Quarterly Calendar Heatmap in Tableau

by Henry Mak

Firstly, create a calculated field which will categorise the months into three distinct columns. For example, January will be in the first column, February in the second, March in the third, April in the first etc. This will create the quarterly structure that we want. I have named this calculated field "Column".

IF MONTH([Order Date)] = 1
OR MONTH([Order Date)] = 4
OR MONTH([Order Date)] = 7
OR MONTH([Order Date)] = 10
THEN "First Column"
ELSEIF MONTH([Order Date)] = 2
OR  MONTH([Order Date)] = 5
OR MONTH([Order Date)] = 8
OR MONTH([Order Date)] = 11
THEN "Second Column"
ELSEIF MONTH([Order Date)] = 3
OR  MONTH([Order Date)] = 6
OR MONTH([Order Date)] = 9
OR MONTH([Order Date)] = 12
THEN "Third Column"

You're welcome.

Next up, create a calculated field which will index the rows depending on the Order Date's week number and the Order Date's minimum week number in that month.

DATEPART('week', [Order Date]) - {FIXED MONTH([Order Date]): MIN(DATEPART('week', [Order Date]))}

After, put these fields onto the columns and rows.

Filter the Order Date to show only the specific year that you want. In my case I have filtered it such that the data only shows the latest year i.e. 2021. Add DAY([Order Date]) onto Label and then colour by your desired field.

Finally, have a play around with the formatting. Below are a couple of examples.

Link to the Tableau workbook for this blog post

Tableau Public