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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.