DAX code
Rolling 6-Month Sales =
CALCULATE(
[Total Sales],
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -6, MONTH)
)
Sums sales over the trailing six months ending on the last date in the current filter context.
Type your table and column names once. Every measure below updates.
Rolling 6-Month Sales =
CALCULATE(
[Total Sales],
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -6, MONTH)
)
Generate a Power BI date table
Requires a continuous, marked Date table.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Rolling 6-Month Sales.