Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I feel like this should be really easy but can't for the life of me work out how to do it 😕 (have tried various pivoting/unpivoting type options but can't get anything to work. Thank you in advance!
Solved! Go to Solution.
Use the following code
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
ChangedType = Table.TransformColumnTypes(Source,{{"Item", type text}, {"Label", type text}}),
GroupBy = Table.Group(ChangedType, {"Item"}, {{"Labels", each Text.Combine([Label],", "), type nullable text}})
in
GroupBy
If this answers your question, please accept it as a solution, and we welcome Kudos 🙂
Ok - thank you for replying and thanks again for your help, greatly appreciated!
Use the following code
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
ChangedType = Table.TransformColumnTypes(Source,{{"Item", type text}, {"Label", type text}}),
GroupBy = Table.Group(ChangedType, {"Item"}, {{"Labels", each Text.Combine([Label],", "), type nullable text}})
in
GroupBy
If this answers your question, please accept it as a solution, and we welcome Kudos 🙂
Thank you that works perfectly - solution accepted!
Was there a way to do that via the menu (i.e. without knowing the code itself?), feels like it would be a fairly common use case!
Unfortunately there is no option in the user interface, you have to Group By then tweak the M code, we can also have the list sorted in ascending order if you wish
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.