Loading

Comparing Prior Year Data by Month

Udgivelsesdato: Feb 27, 2025
Opgave
How to create a monthly year-to-date comparison filterable by calendar month.
Trin
The following instructions can be reviewed in the workbook attached below.
  1. Open Tableau Desktop and select Analysis > Create Calculated Field to create a calculated field.
  2. In the Calculated Field dialog box, enter a name for the field. In this example, the field is named "Prior Sales".
  3. In the formula field, create a calculated field similar to the following and click OK:
    lookup(SUM([Sales]),-1)
  4. 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).
  5. Right-click on QUARTER(Order Date) and select Month.
  6. Double-click Sales and Prior Sales in Measures to add them to the view.
  7. Right-click on Prior Sales on Measure Values, and select Edit Table Calculation.
  8. Under Compute using, select Specific Dimensions.
  9. Check the boxes next to Month of Order Date and Year of Order Date. Click OK.
  10. From the At the level drop-down menu, select Year of Order Date.
  11. From Restarting every drop-down menu, select Month of Order Date, and then click OK. Note: if the option is greyed-out, you may need to re-arrange the order of the Specific Dimensions. 
  12. Right-click MONTH(Order Date) on Rows and select Show Filter.
Yderligere ressourcer
To view the above steps in action, see the video below.
Note: the video has no sound.
 
Vidensartikelnummer

001466361

Vedhæftede filer

Comparing Prior Year Data by Month.twbx

362 KB

 
Indlæser
Salesforce Help | Article