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
gvlado
Advocate I
Advocate I

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
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.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

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