Loading
Feature degradation | Gmail Email delivery failureRead More

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

Publish Date: Mar 26, 2026
Task
How to create a calculated field for a rolling 12-month period of a value using DATEDIFF.
Steps
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 Article Number

001458304

 
Loading
Salesforce Help | Article