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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Hdema
New Member

Values with the highest mark

Hi

I have a table like this:

 

Ref. No.EvaluationValue
A52
A43
A73
B62
B53
B33
B42

 

My goal is to group this data based on its maximum valuation through power query and get the following table:

 

Ref. No.Max EvaluationValue
A73
B62

 

I tried to group it by this:

 

= Table.Group(#"Previous step", {"Ref. No."}, {{"Max Evaluation", each List.Max([Evaluation]), type nullable number}})

 

But I get the Max Evaluation without its corresponding value

 

I would be gratefull for your help

 

Best regards

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi

let
Source = YourSource,
Sort = Table.Sort(Source,{{"Evaluation", Order.Descending}}),
Distinct = Table.Distinct(Sort, {"Ref. No."})
in
Distinct

Stéphane

 

View solution in original post

3 REPLIES 3
Hdema
New Member

Thank you very much Stéphane, it worked perfectly good!!!

slorin
Super User
Super User

Or with Table.Group

= Table.Group(
Source,
{"Ref. No."},
{{"Max", each List.Max([Evaluation]), type nullable number},
{"Value", each [Value]{List.PositionOf([Evaluation],List.Max([Evaluation]))}, type nullable number}}
)

Stéphane

slorin
Super User
Super User

Hi

let
Source = YourSource,
Sort = Table.Sort(Source,{{"Evaluation", Order.Descending}}),
Distinct = Table.Distinct(Sort, {"Ref. No."})
in
Distinct

Stéphane

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.