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

Calculating average of a measure

HI all,

 

I'm currently looking to calculate the average of a measure, specific to each category to create cards as below.

image.png

I have easily created these values by doing the calculations in excel, with the following formulas (in spoiler)

 

Spoiler

'Outcome' Void/Canx Count =(COUNTIFS('Pols Outcome'![Canx/Void Col],"Void",'Pols Outcome'![Category Col],$A2)+COUNTIFS('Pols Outcome'![Canx/Void Col],"Canx",'Pols Outcome'![Category Col],$A2))

 

'Pols Incept' Incept Count =SUMIF('Pols Incept'![Category Col],$A2,'Pols Incept'![NoIncepted Col])

 

Therefore to get an average of each Cat, I could divide the two against each other, or written in longer form, do the following. 

 

Cat. Avg. ADV % =(COUNTIFS('Pols Outcome'![Canx/Void Col],"Void",'Pols Outcome'![Category Col],$A2)+COUNTIFS('Pols Outcome'![Canx/Void Col],"Canx",'Pols Outcome'![Category Col],$A2))/SUMIF('Pols Incept'![Category Col],$A2,'Pols Incept'![NoIncepted Col]).

 

image.png

 

I've tried to re-create similar in PBI, however I'm unable to take the average of the measure I've created, which is ADV% 

"ADV% = DIVIDE([Canx + Void Vol.],[Incept Vol.])". Ideally I'd filter this with just a category but it doesn't allow me to change the format to an average! 
 
Any help would be greatly appreciated! 
 
Kind regards,
 
Jordan 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi all,
 
Seems AverageX combined with Values solved my problems!
 
Examples below. "ADV%" is the measure I'd already created.
 
AverageX of Cat = AVERAGEX(VALUES(Brokers[Cat.]),[ADV%])
AverageX of Product = AVERAGEX(VALUES('Products'[Product Type]),[ADV%])
 
Thanks for your help as usual!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi all,
 
Seems AverageX combined with Values solved my problems!
 
Examples below. "ADV%" is the measure I'd already created.
 
AverageX of Cat = AVERAGEX(VALUES(Brokers[Cat.]),[ADV%])
AverageX of Product = AVERAGEX(VALUES('Products'[Product Type]),[ADV%])
 
Thanks for your help as usual!
Greg_Deckler
Super User
Super User

This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

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.