PowerQuery: How can I concatenate grouped values?

Giffyguy picture Giffyguy · May 18, 2017 · Viewed 18.5k times · Source

If I have the following table (shown in the image below), how can I write a grouped query that would concatenate the grouped results?

InputTable

For this example, I'd want to group by the LetterColumn and concatenate the NumberColumn

So the desired results would be:

ResultsTable

Answer

Marc Pincince picture Marc Pincince · May 19, 2017

You can use the GUI to do it this way:

  1. Select your LetterColumn and then Transform / GroupBy: enter image description here

  2. Select Add Column / Custom Column: enter image description here

  3. Click opposing arrows at top right of new AllData column to Extract Values from new AllData column:

    enter image description here enter image description here

  4. Remove AllData column.