Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Batshell
Frequent Visitor

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.

MAPE.png

Images and pbix file are attached here: https://www.dropbox.com/sh/dsqob7c9mypkroj/AAAbXjMsva_gJueiW7jLjRpaa?dl=0

2 REPLIES 2
Peggy1234
New 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. 

 

benrhoffman
New Member

You 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
))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.