Forum Discussion
Transform duplicate rows into columns ordered by categories
Why not make it easy for someone to help you by providing your dummy data as text which can be easily copy/pasted into Excel or Power BI? Your screenshot is not particularly useful, although you might find someone willing to take the time to transcribe it, you'll probably get more responses if you make it easier.
Also, I do not see in your data any method to decide which column the different listed categories should go into.
In other words, how do we know which are "mobile" and which are "sound"?
- KelvinMorel2 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,
- ronrosenfeld2 years agoFrequent Visitor
One way would be by using the Table.Group function.
- AlienSx2 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 expandyou may rename columns later.