cancel
Showing results for
Search instead for
Did you mean:
Frequent Visitor

## 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?

Thanks

Nice hot greeting from Croatia

1 ACCEPTED SOLUTION
Super User

HI

please find a solution

Maxval = calculate(max(Feuil3[Value]),ALLEXCEPT(Feuil3,Feuil3[a],Feuil3[b]))
3 REPLIES 3
Super User

HI

please find a solution

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

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

Super User

You can create a measure like

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

## Helpful resources

Announcements

#### Check it Out!

Click here to read more about the November 2022 updates!

#### Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors