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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vipett
Helper II
Helper II

Weighted MAPE

I would like to calculate a weighted MAPE but first I can't get the total to work, and secondly no clue how to solve the weighted part.

 

Currently I have two measures, [Current Forecast] and [Actual]. The forecast comparison has three dimensions, Product Group, Country and Month.

This version of MAPE gives me a total line which is just based on the totals per column, but I want to capture acutal MAPE per line and then have the average per product group as the total:

MAPE = IF([Actual]=0,1,ABS(([Actual]-[Current forecast])/[Actual]))
 
In this version I tried with Hasonevalue, but still can't get it to work, same output as the above forumula:
MAPE2 =
VAR MapeElement =
IF([Actual]=0,1,ABS(([Actual]-[Current forecast])/[Actual]))
 
)
RETURN
IF(
    HASONEVALUE(FCTProductMap[Product Group]),
    MapeElement,
    AVERAGEX(FCTProductMap,
    MapeElement
    )
)

 

This is what my table looks like.

MAPE2 should be ~129% and if I have weighted MAPE2 based on Forecast (Acutal where forecast = 0 ), it should be 199%

vipett_1-1702912614928.png

 

 

2 REPLIES 2
mgooren
Frequent Visitor

Hi, 

have you considerd that 1 is the same as 100%, so if you have an actual of 0, the value one would then be translated to 100%. The 12.28% for instance would be 0.1228.

Hope this helps you!

Hi, Yes, if the actual = 0 while we have a forecast, or if the forecast is 0 and the acutal is larger than 0, then it it is a 100% error

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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