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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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