DAX code
Rolling 12-Month Sales =
CALCULATE(
[Total Sales],
DATESINPERIOD('Date'[Date], LASTDATE('Date'[Date]), -12, MONTH)
)
Sums sales over the trailing 12 months ending on the latest date in the current context.
Type your table and column names once. Every measure below updates.
Rolling 12-Month Sales =
CALCULATE(
[Total Sales],
DATESINPERIOD('Date'[Date], LASTDATE('Date'[Date]), -12, MONTH)
)
Generate a Power BI date table
Same pattern as Rolling 3-Month Sales, just with a 12-month window - useful as a smoothed "trailing twelve months" trend line.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Rolling 12-Month Sales.