How to Show Continuous Month or Day Level Data for Multiple Years on the Same Chart in Tableau

preview_player
Показать описание
In this silent video, you’ll learn how to show continuous month/day level data for multiple years on the same graph in Tableau.

- - - - - - - - - - - - - -

Creating a calculated field that pulls out the month/day data without the year. The attached example workbook uses the sample data set Superstore to demonstrate the following directions:

1. Drag [Sales] onto the Rows shelf.
2. Drag [Order Date] onto Color on the Marks card.
3. Create a calculated field with a name like "Date without year" with a calculation similar to the following:
DATEADD(
'year',
DATEDIFF('year',[Order Date],TODAY()),
[Order Date]
)
Note: All dates in Tableau Desktop must have a year, but for the chart we want all data on the same month/day to be grouped despite the year.
Therefore we have given all of the date values the same year.
4. Right-click and drag [Date without year] to the Columns shelf.
5. In the Drop Field dialog, select the green (or continuous) DAY(Date without year) and click OK.

- - - - - - - - - - - - - -

Рекомендации по теме