Forum Discussion
valcat27
Helper III
5 years agoAggregate multiple rows into a single row, separating values by semicolon
Hello all! I would like to merge three tables, but avoiding some duplicated rows without losing some information. The tables are Sales table, Product table and Client table and they are imported fr...
- 5 years ago
Hi valcat27 ,
Try this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0ABFKsTpIXBNULpAA8Y2ATEsgNkLhWYJ5xkCWORjHxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [SalesID = _t, ClientID_max = _t, ClientID_all = _t]), #"Added Custom" = Table.Group(Source,{"SalesID","ClientID_max"}, {{"Column", each Text.Combine([ClientID_all], ","), type text}}) in #"Added Custom"Reference:
Power Query - Combine rows into a single cell - Excel Off The Grid
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlB
Community Champion
5 years agoHi valcat27
Can you share the initial tables in text-tabular format instead of on pics? So that the contents can be copied...
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |