Last Modified Date: 19 Apr 2018
AnswerThe following instructions can be reviewed in the workbook attached below.
- Open Tableau Desktop and select Analysis > Create Calculated Field to create a calculated field.
- In the Calculated Field dialog box, enter a name for the field. In this example, the field is named "Prior Sales".
- In the formula field, create a calculated field similar to the following and click OK:
- Drag Order Date to the Rows shelf, and then click the plus sign (+) on the YEAR(Order Date) field to expand to QUARTER(Order Date).
- Right-click on QUARTER(Order Date) and select Month.
- Double-click Sales and Prior Sales in Measures to add them to the view.
- Right-click on Prior Sales on Measure Values, and select Edit Table Calculation.
- Under Compute using, select Specific Dimensions.
- Check the boxes next to Month of Order Date and Year of Order Date. Click OK.
- From the At the level drop-down menu, select Year of Order Date.
- From Restarting every drop-down menu, select Month of Order Date, and then click OK.
- Right-click MONTH(Order Date) on Rows and select Show Filter.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials