Forum Discussion
Calculate Mean Absolute Percent Error (MAPE) when all values are in singular column?
- 4 years ago
Edit: So, I found out a way to solve this problem after reading https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907.
First, I modified [7. Backtesting Mape] to solely return MapeElement.
Then I created a measure:
7. Backtesting MAPE Summarize = VAR _table = SUMMARIZE( '7_Temp', '7_Temp'[Date] "_Value", [7. Backtesting MAPE] ) RETURN IF( HASONEVALUE('7_Temp'[Date]), [7. Backtesting MAPE], AVERAGEX(_table, [_Value]) ) )This measure is returning the correct MAPE value.
Edit: So, I found out a way to solve this problem after reading https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907.
First, I modified [7. Backtesting Mape] to solely return MapeElement.
Then I created a measure:
7. Backtesting MAPE Summarize =
VAR _table =
SUMMARIZE(
'7_Temp',
'7_Temp'[Date]
"_Value", [7. Backtesting MAPE]
)
RETURN
IF(
HASONEVALUE('7_Temp'[Date]),
[7. Backtesting MAPE],
AVERAGEX(_table, [_Value])
)
)
This measure is returning the correct MAPE value.
- v-chenwuz-msft4 years ago
Community Support
Hi fourmj ,
Glad you found the answer, please mark it as the correct answer so that more people with the same problem as you can find the answer quickly.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.