This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello Guys!
I need to create a custom column that combines all the "ITEM" with the same "ID".
Thanks,
Solved! Go to Solution.
Hi @kladkent ,
Try this example query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJydFeK1YGwfRwDQvwDwFwjINfVMSjAw9/PFS4Q4Orn7OmD4MIljYE8b9dIJ3/HIBe4gLOHo2eQUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, ITEM = _t]),
groupRows = Table.Group(Source, {"ID"}, {{"data", each _, type table [ID=nullable text, ITEM=nullable text]}, {"CUSTOM COLUMN", each Text.Combine([ITEM], ", "), type nullable text}}),
expandDataCol = Table.ExpandTableColumn(groupRows, "data", {"ITEM"}, {"ITEM"})
in
expandDataCol
You basically group your table on [ID] and add an 'All Rows' aggregated column and a 'SUM' column on [ITEM].
This obviously gives an error, so you adjust your Group By code to change List.Sum([ITEM]) to Text.Combine([ITEM], ", ").
You then expand the [ITEM] column back out from the nested All Rows column.
Example output:
Pete
Proud to be a Datanaut!
Hi @kladkent ,
Try this example query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJydFeK1YGwfRwDQvwDwFwjINfVMSjAw9/PFS4Q4Orn7OmD4MIljYE8b9dIJ3/HIBe4gLOHo2eQUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, ITEM = _t]),
groupRows = Table.Group(Source, {"ID"}, {{"data", each _, type table [ID=nullable text, ITEM=nullable text]}, {"CUSTOM COLUMN", each Text.Combine([ITEM], ", "), type nullable text}}),
expandDataCol = Table.ExpandTableColumn(groupRows, "data", {"ITEM"}, {"ITEM"})
in
expandDataCol
You basically group your table on [ID] and add an 'All Rows' aggregated column and a 'SUM' column on [ITEM].
This obviously gives an error, so you adjust your Group By code to change List.Sum([ITEM]) to Text.Combine([ITEM], ", ").
You then expand the [ITEM] column back out from the nested All Rows column.
Example output:
Pete
Proud to be a Datanaut!
You're welcome.
Don't forget to give a thumbs-up on any posts that have helped you 👍
Pete
Proud to be a Datanaut!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 |