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

AVERAGEIFS in Power BI

Hi there

 

I'm trying to replicate AVERAGEIFS from excel in Power BI by looking at a list of sales, which have a tier attached to them based on value, and I'd like to get the averages for each tier (see below):

 

Power BI AverageIfs v2.JPG

 

I have a table of sales in Power BI with the tiers as above, what DAX is required to create a column next to the tiers to calculate the averages across the entire sales columns for each of the tiers?

 

Thank You

Dhushy

1 ACCEPTED SOLUTION
vmakhija
Post Prodigy
Post Prodigy
4 REPLIES 4
vmakhija
Post Prodigy
Post Prodigy
Anonymous
Not applicable

Thanks! Using Average by itself over the Sales column and combining it with Tiers (as Row values) seems to have done th trick.

@Anonymous

 

Average Value =
CALCULATE ( AVERAGE ( Table1[Sales] ), ALLEXCEPT ( Table1, Table1[Tier] ) )

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

This seems to give an average over all the tiers when I use it, thus giving me the same value for all Tiers - any idea why?

 

Using Average(Table[Sales]) and then using Tiers as Rows worked however, I think I still need to do a lot of learning as to why that is the case but it's solved the problem at hand.

 

Thanks for your help!

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.