Forum Discussion
KelvinMorel
2 years agoHelper II
Transform duplicate rows into columns ordered by categories
Hi all, I got to transform duplciated category rows into columns using: = Table.Group(Source, {"ID", "ORDER"}, {{"CATEGORY", each Text.Combine([CATEGORY], ","), type nullable text}}) then split th...
KelvinMorel
2 years agoHelper II
Hi ronrsnfld,
Fair enough but I didn't realize the "dummy data" would be a big deal, maybe I need reformulate the question:
How do I order the data get the same sequence before transforming it?
Cheers,
AlienSx
2 years agoSuper User
Hi, KelvinMorel
let
Source = your_table,
g = Table.Group(Source, {"ID", "ORDER"}, {{"all", each [a = List.Distinct([MOBILE]), b = Record.FromList(a, a)][b]}}),
expand = Table.ExpandRecordColumn(g, "all", List.Distinct(Source[MOBILE]))
in
expand
you may rename columns later.