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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Help with the Dax to find the average.

Hello All,

 

I have a table similar to this:

t1.PNG

 

I need to find the average of "ID" with the maximum "value" of each "num".

 

In this case - I need the average of A to be = (5+6+7)/(3) = 6.

 

Looking forward to your help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi @Anonymous 

Create this measure

Measure = CALCULATE(AVERAGEX('Table',CALCULATE(MAX('Table'[Value]),ALLEXCEPT('Table','Table'[ID],'Table'[Num]))),ALLEXCEPT('Table','Table'[ID]))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

hi @Anonymous 

Create this measure

Measure = CALCULATE(AVERAGEX('Table',CALCULATE(MAX('Table'[Value]),ALLEXCEPT('Table','Table'[ID],'Table'[Num]))),ALLEXCEPT('Table','Table'[ID]))
Anonymous
Not applicable

Thank for your quick response. But I just forgot to mention that "Value" is a calculated measure and it shows an error if I try to include it in Max.

What should I do now?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.