Forum Discussion
jomaor1
1 year agoNew Member
Parent Split for two columns
Hello guys, I have a very simple problem, but I cannot seem to find a solution. I have a very simple table containing 3 columns: Product, Serial & Heritage as below image. Unfortunately for the...
- 1 year ago
Didn't help, but your idea manage to point me in the right direction. Got to work with a duplicate of the same table:
1st Table splits the Serial, 2nd Table splits the Heritage.
Create Index in both of them, and then Merge them together using the Indexes and comum column.
Thanks!
dufoq3
Community Champion
1 year agoHi jomaor1, another solution:
Output
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnQJc1bSUXLUcdIB0YY6RjrGSrE60Uohjn7eQAEXHVcdNyBtomOqY6YUGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Product = _t, Serie = _t, Patri = _t]),
Transformed = List.TransformMany(Table.ToRows(Source),
each List.Zip(List.Transform(List.Skip(_), (x)=> Text.Split(x, ","))),
(x,y)=> Table.FromRows({{x{0}} & y}) ),
Combined = Value.ReplaceType(Table.Combine(Transformed), Value.Type(Table.FirstN(Source, 0)))
in
Combined