Loading

Calculating a Rolling 12-Month Value with DATEDIFF() in Tableau Desktop

Publiceringsdatum: Mar 26, 2026
Uppgift
How to create a calculated field for a rolling 12-month period of a value using DATEDIFF.
Steg
The following example is based on the Superstore sample data source.
  1. Go to Analysis > Create Calculated Field.
  2. Enter the following calculation: IF (DATEDIFF('month',[Order Date],TODAY()))<=12 THEN [Sales] ELSE null END
  3. Enter desired name for the field.
  4. Click OK.
Knowledge-artikelnummer

001458304

 
Laddar
Salesforce Help | Article