Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I set up a measurement that calculates the KPI MAPE, but the totalizer does not present the correct result.
Measure breakdown:
MAPE:=IF(HASONEVALUE(base[Cod_SAP]); iferror(if([Forecast] <=0; 1;abs([Forecast] - [Measured]) / [Measured]); 1); AVERAGEX(base;iferror(if([Forecast] <=0; 1;abs([Forecast] - [Measured]) / [Measured]); 1)))
And the detail of the other measures:
Forecast:=CALCULATE(sum([Unidades]);base[Atributo] = "Forecast")
Measured:=CALCULATE(sum([Unidades]);base[Atributo] = "Measured")
The results: https://i.imgur.com/laRfRW5.png
The averages Forecast and Measured are in the same column, but are filtered.
At that moment, the MAPE measure works when I look at an item, but in total it does not present the correct value. In a search, I saw that I could use AVEGAREX, but it didn't work. Can you help me? Thanks!
Can you explain how averaging the item-level values is "more correct" than doing (Total Forcast - Total Measured)/Total Measured, (which is an average weighted by [Measured] rather than giving the same weight to each item)?
I also had this doubt when I analyzed the calculation made in an excel spreadsheet. In summary, it is a methodology that was adopted here, where the total view is the sum of the averages.
It's certainly possible to average the averages but I wouldn't recommend it unless you have a specific reason to do so.
I understand your point, but it is a methodology that the company uses. Anyway, thank you for your help.
For averaging over Items, the pattern looks like this:
Avg Item MAPE = AVERAGEX ( VALUES ( base[Item] ), [MAPE] )
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |