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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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