Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi
I have a table like this:
| Ref. No. | Evaluation | Value |
| A | 5 | 2 |
| A | 4 | 3 |
| A | 7 | 3 |
| B | 6 | 2 |
| B | 5 | 3 |
| B | 3 | 3 |
| B | 4 | 2 |
My goal is to group this data based on its maximum valuation through power query and get the following table:
| Ref. No. | Max Evaluation | Value |
| A | 7 | 3 |
| B | 6 | 2 |
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
Solved! Go to Solution.
Hi
let
Source = YourSource,
Sort = Table.Sort(Source,{{"Evaluation", Order.Descending}}),
Distinct = Table.Distinct(Sort, {"Ref. No."})
in
Distinct
Stéphane
Thank you very much Stéphane, it worked perfectly good!!!
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
Hi
let
Source = YourSource,
Sort = Table.Sort(Source,{{"Evaluation", Order.Descending}}),
Distinct = Table.Distinct(Sort, {"Ref. No."})
in
Distinct
Stéphane
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 6 | |
| 5 |