Last Modified Date: 20 Jul 2023
Environment
Tableau DesktopAnswer
The following instructions can be reviewed in the workbook attached below.Step 1
- Create a new calculated field. In the attached workbook, this field is named "Sept -Dec 2010".
- In the formula field type:
IF DATEPART('year', [Order Date]) = 2010 and DATEPART('month', [Order Date]) = 9 Then "Sept - Dec" elseif DATEPART('year', [Order Date]) = 2010 and DATEPART('month', [Order Date]) = 10 then "Sept - Dec" elseif DATEPART('year', [Order Date]) = 2010 and DATEPART('month', [Order Date]) = 11 then "Sept - Dec" elseif DATEPART('year', [Order Date]) = 2010 and DATEPART('month', [Order Date]) = 12 then "Sept - Dec" else DATENAME('month',[Order Date]) end
Step 2
- Create a new calculated field. In the attached workbook, this field is named "Q3 & Q4 Combined".
- In the formula field type:
If DATEPART('year',[Order Date]) = 2010 and DATEPART('quarter',[Order Date]) = 3 then "Q3 & Q4 Combined" elseif DATEPART('year',[Order Date]) = 2010 and DATEPART('quarter',[Order Date]) = 4 then "Q3 & Q4 Combined" else "Q" + DATENAME('quarter', [Order Date]) end
- Drag Order Date to the Columns shelf.
- Drag Q3 & Q4 Combined to the Columns shelf.
- Drag Sept -Dec 2010 to the Columns shelf.
- Drag Customer Name to the Rows shelf.
Additional Information
Date FunctionsThank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials