Last Modified Date: 20 Jul 2023
Environment
Tableau DesktopAnswer
Option 1
Use a the join calculation feature. For details about this topic, see Tableau Help. Create a data source which includes all dates such as CalendarTable.xlsx.- Open Sample - Superstore by Tableau Desktop.
- On the data source tab, click Add and select CalendarTable.xlsx.
- Inner join the Orders table and the Calendar table by 1 = 1 with using the join calculation.
- This means that you need to enter "1" in each join calculation
- As the result of this step, each row in the Orders table joined to all rows in the Calendar table.
- Select Analysis > Create calculated field
- Name the calculated field "After Order Before Ship"
- Enter the following formula and click OK:
IF [Calendar Date] >= [Order Date] AND [Calendar Date] <= [Ship Date] THEN 1 ELSE 0 END
- Place Calendar Date to rows and After Order Before Ship to text.
Option 2
If you are using an earlier version of Tableau Desktop, a potential workaround would be to add a common column to both your data sources ; each column should contain "1" in every row.Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials