cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
vbourbeau
Resolver II
Resolver II

Average of average

Hi,

I want to do something probably easy but I don't figure it out. 

I have a mesure that is an average of value. When I do a table and regroup, the average always remains on all the data but I want to have it on the grouping value. Look bellow, the correct average should be 13.25...

 

Thank

 

2020-04-09 11_36_27-Window.png

1 ACCEPTED SOLUTION

@vbourbeau ,Try like

averagex(Summarize(Table,Table[id],"_1",average(Table[Value])),[_1])

View solution in original post

5 REPLIES 5
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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
jthomson
Solution Sage
Solution Sage

There's plenty of solutions as to how to have a measure do a different calcuation dependent on if your measure is working on a total or not which is what you're going to want. Ignoring the fact that the results don't make sense given the data you've presented (the average of 5, 7 and 9 isn't 6.5), the total is calculating the average of all the data, which would be (5+7+9+20)/4, i.e. 10.25

az38
Community Champion
Community Champion

@vbourbeau  use smth like

= calculate(AVERAGEX(Table, AVERAGE('Table'[Value]) ) )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Same result

2020-04-09 12_03_03-Window.png

@vbourbeau ,Try like

averagex(Summarize(Table,Table[id],"_1",average(Table[Value])),[_1])

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors