Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to merge the rows based on ID .
This is my raw data table.
ID | Model | Price | Quantity |
OVSIL22122018834-1 | A | 23 | 30 |
OVSIL22122018834-1 | B | 23 | 30 |
OVSIL22122018834-2 | C | 27 | 60 |
OVSIL22122018834-2 | D | 27 | 60 |
And the the table i would like to get is;
ID | Model | Price | Quantity |
OVSIL22122018834-1 | A,B | 23 | 30 |
OVSIL22122018834-2 | C,D | 27 | 60 |
Solved! Go to Solution.
Hi @PhyuLayKhine333 ,
You cant try this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8g8L9vQxMjI0MjIwtLAwNtE1VNJRcgRiI2MgYWygFKuDQ5ETIUVGQDlnkCJzIGGGR5ELsqJYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Model = _t, Price = _t, Quantity = _t]),
#"Grouped Rows" = Table.Group(Source, {"ID", "Price", "Quantity"}, {{"Rows", each _, type table [ID=nullable text, Model=nullable text, Price=nullable text, Quantity=nullable text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Model", each Table.Column([Rows],"Model")),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Model", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
#"Removed Columns" = Table.RemoveColumns(#"Extracted Values",{"Rows"})
in
#"Removed Columns"
Hi @PhyuLayKhine333 ,
You cant try this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8g8L9vQxMjI0MjIwtLAwNtE1VNJRcgRiI2MgYWygFKuDQ5ETIUVGQDlnkCJzIGGGR5ELsqJYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Model = _t, Price = _t, Quantity = _t]),
#"Grouped Rows" = Table.Group(Source, {"ID", "Price", "Quantity"}, {{"Rows", each _, type table [ID=nullable text, Model=nullable text, Price=nullable text, Quantity=nullable text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Model", each Table.Column([Rows],"Model")),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Model", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
#"Removed Columns" = Table.RemoveColumns(#"Extracted Values",{"Rows"})
in
#"Removed Columns"
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.