Forum Discussion

Adam01's avatar
Adam01
Advocate I
4 years ago
Solved

Combining Rows based on the ID of that table

Hello!   I am wanting to combine values based on the unique ID of that table, so for any values that have the same ID I want them to be pushed into the same cell. To explain this better I've includ...
  • AlexisOlson's avatar
    4 years ago

    You can do this with a small tweak to Group By.

     

    Click Group By under the Home tab and group by ID taking the max over Value.

    This generates code that looks like this:

    = Table.Group(#"Changed Type", {"ID"}, {{"Value", each List.Max([Value]), type nullable text}})

    We don't actually want List.Max though. Replace that with Text.Combine like this:

    = Table.Group(#"Changed Type", {"ID"}, {{"Value", each Text.Combine([Value], ", "), type text}})