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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.