Annual Calendar in Tableau – 2. Filling in the Gaps

by Sijia Wei

There are two ways to fill in the gaps on the calendar. One, we can add the missing dates in the dataset, but there is something else we can do without touching the data.

Step 1: Start a new worksheet for a ‘Background Calendar’, create a calculated field using the ‘MakeDate’ function.

The function will create 31 days for each of these 12 months of your selected year, and it is smart enough to know, for example, there are only 28 days in Feb 2018. Therefore, day 29, 30, 31 will automatically become 1st, 2nd, 3rd of Mar.

Step 2: Repeat steps in the last blog – create the calculated field for ‘Number of Months within a Quarter’, and – ‘Number of Weeks within a Month’.

Step 3: Put your calculations on Columns and Rows

Columns: Number of Months within a Quarter(Dot) >> Weekday(Dot)

Rows: Quarter(Dot) >> Number of Weeks within a Month(Dot)

Step 4: Create a new Dashboard, make the Actual Calendar transparent, put it on top of the Background Calendar, set exactly the same Position and Size for these two.

*Noted that the MakeDate function is only available for Tableau Data Extracts.

© 2022 The Information Lab Ltd. All rights reserved.