The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
i calculate Demand Plan Monthly Error as a measure DPME = |Demand Plan - Actual Sales| / Actual Sales
The result looks similar like that:
i also give informaction how DPME look for last 12 month altogether. In showed example is 77% (ist not average, DPME is calculated for last 12 mc altogether). I have to prepare a chart as above but instead of showing for yyyy-mm data for a given month, I have to show, data for the last 12 months. Example:
For data prepared in Sep-24
is it posiible to do some measures like that? which can be put on chart on the top?
Hi @ewakol ,
Have a good day. Did you resolve the issue? If the issue persists, could you please share sample data and expected output?
Best Regards,
Wearsky
@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.
Proud to be a Super User! |
|
Than you very much for reply, i tried this solution but it doesny work please see below: