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
Anonymous
Not applicable

how to find the average of a measure thats used in a Grid

Hi Team,

 

Please find the sample data,

 

Item CodeSales Period NamePromotion NameSales UnitsForecast UnitsForecast AccuracyMAPE 
1108344P12AP12A 2 FOR �650131034.1120.63%79.37% 
1113348P12AP12A 2 FOR �662311717.8127.57%72.43%66.62%
5919436P12AP12A 2 FOR �62079492.5923.69%76.31% 
5919428P12AP12A 2 FOR �61755490.427.94%72.06% 
5919371P12AP12A 2 FOR �6749131.4617.55%82.45% 
1113453P12AP12A 2 FOR �61425283.4819.89%80.11% 
4114167P12AP12A 2 FOR �63400.00%100.00% 
8446199P12ADO MY OFFERS SKINCARE P121408911491.6181.56%18.44% 
8446199P12AP12A SAVE SUMMER REVIVED1408911491.6181.56%18.44% 
   4546427133.07 40.32% 

 

I have to find the average of the MAPE field.currently MAPE is a measure and its giving the value and shown as a KPI and its current value is 40.32%.But instead of this value i have to get the average value as 66.32.Team any idea how to achieve it.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 
Create measures
Forecast Accuracy = SUM('Table'[Forecast Units])/SUM('Table'[Sales Units])

Mape = 1-[Forecast Accuracy]

Measure = IF(HASONEVALUE('Table'[Item Code]),[Mape],AVERAGEX(ALL('Table'),[Mape]))
Capture9.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 
Create measures
Forecast Accuracy = SUM('Table'[Forecast Units])/SUM('Table'[Sales Units])

Mape = 1-[Forecast Accuracy]

Measure = IF(HASONEVALUE('Table'[Item Code]),[Mape],AVERAGEX(ALL('Table'),[Mape]))
Capture9.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AnthonyTilley
Solution Sage
Solution Sage

Measure = 
var fa = AVERAGEX('Table',DIVIDE([Forecast Units],[Sales Units]))
var mape = 1-fa
return mape

avx.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@AnthonyTilley,Thank you for the reply.

 

I have tried as you suggested but its not giving the expected result in huge data.

 

In my scenario i have to use the formula MAPE=ABS(SALES-FORECAST)/SALES 

 

and need to get the average of MAPE.(AVERAGE(MAPE),similar to selecting a particular column in excel and finding average)

 

Thank you for you time..

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.