Forum Discussion
GDE
6 years agoRegular Visitor
Transpose a List in Power Query
How do I Transpose a List like: {1, 2, 3} into another List like: {{1}, {2}, {3}} in Power Query? Thanks in advance!
- 6 years ago
Table.ToRows(Table.FromList(List))
- 3 years ago
= List.Zip( { your_list } )
example: List.Zip( { {1, 2, 3} } ) = { {1}, {2}, {3} }
Zubair_Muhammad
6 years agoCommunity Champion
let
Source = {1, 2, 3},
New= List.Generate(()=>[a={},b=0], each [b] <= List.Count(Source), each [a={Source{b}},b=[b]+1], each [a])
in
NewGDE
6 years agoRegular Visitor
Wow! That is a mighty function right there! A little (a lot) out of my leaugue...
Respect!