Hi readers!
Bet you didn’t know you could create a calendar in Tableau right? This was a great little trick we learnt from Head Coach Andy last week, perfect for using in a viz where dates are a factor like in my viz last week on US flight data:
This was a quick way for our Stateside brothers and sisters to develop a strategy to dodge the delays when flying home for Christmas.
Firstly in a new worksheet…
- Right click and drag your date field onto the columns shelf and select the WEEKDAY discrete (blue) option.
- Do this again but place your date field in the rows shelf and select the WEEK discrete option.
- Change the mark option to Square (using the dropdown option on the Marks Card)
- Right click and drag your date field now to the Filter shelf and select the Month/Year option and pick a month/year at random.
- Feel free to colour the days by any field you like e.g. profit, sales etc – this is ensure your squares fill out evenly
- To add day of the month, right click and drag your date field now to the Label card and select DAY discrete and change the alignment to top right.
- Right click Week of your date field on the left hand side and deselect Show Header for a cleaner more calendar-like appearance.
What comes up when you right click and drag a date field into the view:
Changing the alignment in the Label card for day of the month in your calendar:
You can then use this calendar in your dashboards or stories as a stand alone or as an interesting filter!
Thank you for reading.
Anuka