dinsdag 28 februari 2023

 How to combine multiple rows in one row using Powerquery function : Group- by

Suppose you want to Group Names in one Cell and make a Sum the Count of multiple rows into one cell of below table using powerquery or PowerBI.


Select the table add into PowerQuery and use the function Group-by ( Dutch groeperen op)

Choose advanced doing the following: 

I changed the new Columnname into Names

After OK, one error appears for the column of Names.


You need to change the formula on the top :

- change in the formula List.Sum([Name]) into :Text.Combine([Name],", ")

The extra ", " gives you a usefull separarator.


It will work!