How To Create a Quarterly Calendar Heatmap in Tableau

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"
END

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

Twitter

LinkedIn

Author:
Henry Mak
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab