KNOWLEDGE BASE

Display future dates that are not in the data


Published: 04 Nov 2022
Last Modified Date: 05 Nov 2022

Question

How to display future dates that are not in the data.

The example demonstrated here supposes the data source only has data through December 2022, but you want a visualization through December 2023.
User-added image

Environment

  • Tableau Desktop

Answer

Option 1

Prepare another data source with the date values you want to display and merge them.

1. Create a Date Master table like the attached data source, Date Master.xls.
2. Launch Tableau Desktop and connect to the attached data source Sample - Superstore2022.xls.
3. In the Data Source tab, drag the sheet Orders to the canvas.
4. Click on Add > Connect to Date Master table.
5. Double-click on Orders on the canvas.
6. Drag the table of Data Master next to Orders on the canvas.
User-added image
7. Select Full Outer to join the date fields together as shown here:
User-added image
8. Move to Sheet 1.  Right-click to drag Date in Master Date to Columns then select MY(Date).
User-added image

Scroll to the right and you will see the 2023 frame.
User-added image

Option 2

Use the date range extension feature.
*If you use Option 2, the date filter may not work as desired.
  The filter restriction is described in the Additional Information section.

1. Launch Tableau Desktop and connect to the attached data source, Sample - Superstore2022.xls.
2. In the Data Source tab, drag the sheet Orders to the canvas.
3. Move to Sheet 1.  Right-click and drag Order Date to Columns then select Month (Order Date) for  measure.
User-added image
4. Right-click Month (Order Date) on Columns then select Discrete.
User-added image
5. Right-click Month(Order Date) on Columns then select Extend Date Range > 1 Year.
User-added image

Scroll to the right to see the 2023 frame.
User-added image


 

Additional Information

Filter restriction of Option 2.
When using the "Extend Date Range" function, the specified period of time will be extended in a fixed manner.
Therefore, if a filter is used, it will always be extended by the maximum filtered value plus the specified period of time.

For example, if you filter Order Date by 2021 then the 2022 frame is also shown.
User-added image
Did this article resolve the issue?