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
Hello! I have a problem that I am sure is probably pretty basic but my brain has quit functioning and I can't get past this. I have a table with two columns. An ID column and a Service column. Shown below:
| ID | Service |
| 65895976 | 10 |
| 86019440 | 12 |
| 86019440 | 10 |
| 65895976 | 20 |
| 65895976 | 30 |
| 86019440 | 12 |
| 65895976 | 10 |
| 87335274 | 20 |
| 30595323 | 20 |
| 84777902 | 10 |
| 84777902 | 30 |
| 84777902 | 50 |
| 45320398 | 10 |
| 65895976 | 10 |
| 88852113 | 20 |
As you can see, the ID column has duplicate values, I would like to combine the duplicates in the ID column and then concatenate the Service column for each row as shown below:
| ID | Service |
| 65895976 | 10,20,30,10 |
| 86019440 | 12,10 |
| 87335274 | 20 |
| 30595323 | 20 |
| 84777902 | 10,30,50 |
| 45320398 | 10 |
| 88852113 | 20 |
ANy help would be GREATLY aooreciated!!!
Solved! Go to Solution.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Service", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"All services", each Text.Combine([Service], ", ")}})
in
#"Grouped Rows"
Hope this helps.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Service", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"All services", each Text.Combine([Service], ", ")}})
in
#"Grouped Rows"
Hope this helps.
Perfect! Thank you so much!
You are welcome.
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.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 192 | |
| 125 | |
| 99 | |
| 67 | |
| 48 |