Forum Discussion
Calculate MAPE based on Absolute Percentage Error
Hi there
We have a requirment to use statistics to show the MAPE for a user on how well their Electricity Usage correlates with the Moving Average of what we estimate they should use.
To get to the value of Mean Absolute Percentage Error (MAPE) we need the average of the Absolute Percentage Error (ABS_PCT_ERR) which can only be calculated as a measure it seems. However we are unable to find a way to extract the Average of a Measure. Calculated Columns does not work.
Any help, tips, ideas. We have gone through every article that could have possibly helped us.
Images and pbix file are attached here: https://www.dropbox.com/sh/dsqob7c9mypkroj/AAAbXjMsva_gJueiW7jLjRpaa?dl=0
2 Replies
- Peggy1234New Member
Conscious the original post was from 2018 but we recently had a similar challenge and struggled to find an answer in the forums.
We solved this issue by referencing the current measure (ABS_PCT_ERR) within a new measure using AVERAGEX and SUMMARIZE.
New measure = AVERAGEX ( SUMMARIZE ( DATE Table, DATE Column , "ColumnName123" , [ABS_PCT_ERR] ) , [ColumnName123] )This should give you the same results in each row of your table visual, but give you an average at the bottom. - benrhoffmanNew MemberYou can use the Hasonevalue function:IF(HASONEVALUE('table'[date]),DIVIDE(ABS(AVERAGE('table'[actual]) - AVERAGE('table'[predicted])),AVERAGE('table'[actual]))*100,AVERAGEX('table',DIVIDE(ABS('table'[actual]) - table'[predicted]),'table'[actual])*100))