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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
gvlado
Advocate II
Advocate II

Find max for each group of rows

Hello. 
I have the problem - how to get column 3 according to Column 1, 2, and the value column (table is below)
For the locations and names, I have to detect the max value that I will use in further calculations 
Not sure can it be done in M Query or DAX? 

gvlado_0-1656678122292.png

 

 

Thanks

Nice hot greeting from Croatia

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI

please find a solution

JamesFr06_0-1656680444994.png

Maxval = calculate(max(Feuil3[Value]),ALLEXCEPT(Feuil3,Feuil3[a],Feuil3[b]))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI

please find a solution

JamesFr06_0-1656680444994.png

Maxval = calculate(max(Feuil3[Value]),ALLEXCEPT(Feuil3,Feuil3[a],Feuil3[b]))

Thanks a lot
Sometimes I cant' find so simple solutions 
That is why this community is valuable - quick and simple Q&A
You earned coffee from me
Thanks once again

johnt75
Super User
Super User

You can create a measure like 

Max Value for Location = CALCULATE( MAX('Table'[Value]), ALLEXCEPT('Table', 'Table'[Column1]))

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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