Forum Discussion
Anonymous
3 years agoNot applicable
Splitting multiple values in a row to columns
Hi Team,
I have one scenario Which is having two columns Start and End.
Start End
A,B,C X,Y,Z
and I need output like this.
Start End
A X
B Y
C Z
Please help me on this.
4 Replies
- wdx223_DanielCommunity Champion
=#table({"Start","End"},List.TransformMany(Table.ToRows(Table),each List.Zip(List.Transform(_,each Text.Split(_,","))),(x,y)=>y))
- AnonymousNot applicable
- JoeBarrySolution Sage
Hi Anonymous
In Power Query
- Highlight the Start column
- In the Transform tab choose split by delimter and choose comma
- Highlight the columns that are created with the values
- right click and choose Unpivot columns
repeat for the End columns
thanks
Joe
- slorinSuper User
Hi,
= Table.FromColumns( {Text.Split(Source[Start]{0},",") , Text.Split(Source[End]{0},",")} , Table.ColumnNames(Source))or
= Table.FromColumns(List.Transform(Record.ToList(Source{0}), each Text.Split(_,",")), Table.ColumnNames(Source))Stéphane