Forum Discussion
Measure calculated for rolling specified period
ewakol ,
Create a Date Table: Ensure you have a Date table in your model. If not, create one. This table should have a continuous range of dates covering the period of your data.
Create the DPME Measure: Use DAX to create a measure that calculates the DPME for the last 12 months.
DPME 12 Month Rolling =
VAR CurrentDate = MAX('Date'[Date])
VAR StartDate = EDATE(CurrentDate, -12) + 1
RETURN
CALCULATE(
SUMX(
'Sales',
ABS('Sales'[Demand Plan] - 'Sales'[Actual Sales]) / 'Sales'[Actual Sales]
Create a Line Chart: Add a line chart to your Power BI report.
Add Data to the Chart:
Drag the Date field from your Date table to the Axis of the chart.
Drag the DPME 12 Month Rolling measure to the Values of the chart.
Format the Chart: Adjust the chart formatting as needed to display the data clearly.
Than you very much for reply, i tried this solution but it doesny work please see below: