Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi i ve got data as shown in the example below
ID | Package |
1 | [barcode1], [barcode2], |
2 | [barcode1], [barcode2], [barcode3] |
3 | barcode1] |
And using Power Query, I would like to receive it in the format shown below. Could you please assist me?
ID | Package |
1 | [barcode1] |
1 | [barcode2] |
2 | [barcode1] |
2 | [barcode2] |
2 | [barcode3] |
3 | [barcode1] |
Solved! Go to Solution.
consider your data as below
select Package column and go to home tab and select split column and make the below changes over it
press ok to find the result as below
finally filter blank cellls
consider your data as below
select Package column and go to home tab and select split column and make the below changes over it
press ok to find the result as below
finally filter blank cellls
1 to 2
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUYpOSixKzk9JNYzVUYCxjWKVYnWilYxwSiPYxhClxihKlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Package = _t]),
result = Table.ExpandListColumn(Table.TransformColumns(Source, {"Package", each List.Transform(Text.Split(_, ","), Text.Trim)}), "Package")
in
result
2 to 1
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUYpOSixKzk9JNYxVitVBFTKCCBlhqjLCr8oYImSMpjEWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Package = _t]),
Group = Table.Group(Source, {"ID"}, {{"Package", each Text.Combine(_[Package], ","), Int64.Type}})
in
Group
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
13 | |
11 | |
9 | |
6 | |
6 |