Calendar views are used in various different business applications. Smartsheet calendar view is a good example and there are free apps like google calendar and Apple Calendar.
Did you know that you can also create a calendar view using Tableau?
With Tableau, you can further customize the calendar view with unlimited potential business use cases. By incorporating actions, your users can highlight or filter for certain values based on user’s date selections on the calendar view. You can also add mode detailed data or a sheet with graphs into the tooltip.
If you haven’t tried a calendar view before, you are at the right place. I will share the simplest and most efficient way to create it.
My calendar view shows all dates in calendar. You will see why this is a major improvement to many calendar views created by others.
1. Prepare Dummy Calendar Data
First, you will need a dummy calendar dataset with the entire universe of dates you would like to include in your view.
Unfortunately, Tableau can only show data points that exists in the dataset. Take for example of the Superstore data. Since orders don’t occur everyday, Tableau will not show the dates when there was no order date. (Note: You are not going to be able to use the “fill missing value” option in a calendar view)
Create a calendar dataset with dummy date column as below. I actually created a file for you. You can download it from this link.
2. Blend the Two Datasets
In Tableau, add a data connection to the dummy calendar dataset. Then also add another data connection to the actual data you would like to blend with. In this example, I will use the Superstore data.
Next step is to go to Data > Edit Blend Relationships. Then select the dummy calendar data as the primary data source.
Next, add a custom data blend relationships as follows. In my case, I had to establish the relationships between my dummy dates and the Order Date for month, day, quarter, year, weekday, and week all separately.
Let’s bring the two date fields into a sheet to make sure we established the relationship correctly.
Make sure to click the icon next to the Order Date first to activate the relationship.
Looks like we have the correct blend data relationship!
3. Create a Calendar View
- Add dummy date filed to the Columns shelf as a weekday format.
- Add dummy date filed to the Rows shelf as a week number format then hide header.
- Add dummy date filed to the Rows shelf as a Month-Year format.
- Add any dimension or measure field to the marks.
- Use the dummy date to add filters for year and month. In this example, I am filtering for March 2019.
Voila! See below final calendar view.
It shows all dates on the calendar view.
Do you see this view shows all dates even for those dates without an order? That’s because we blended the data well.
Why is this a big deal? Many people who tried creating a calendar view has been frustrated by not being able to show all dates. Most datasets don’t have a data points for every single day. That means Tableau only visualizes the dates with corresponding date points.
see below example for when you don’t blend the data properly. It is missing the dates without any order.