Forum Discussion

16Teams's avatar
16Teams
Copper Contributor
Apr 05, 2021

Convert two columns so that they appear below each other (C&D goes below A&B and so on)

 

In Power Query I have a table that converts a list of player and their points to rows. What do I need to change in the table that will convert it back from rows to to columns.(Columns A & B then columns C & D are placed below A & B and so on)  

 

Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],

ChangedTypes = Table.TransformColumnTypes(Source,

{{"Players", type text}, {"Pts", Int64.Type}}

),

The table below allows columns A&B  

SplittedTable = Table.Split(ChangedTypes, 11),

EachTableToColumns = List.Combine(

List.Transform(SplittedTable, Table.ToColumns)

),

ToTable = Table.FromColumns(EachTableToColumns,

List.TransformMany({1..List.Count(EachTableToColumns) / 2}, each {"Team ","Pts Team "},

(x,y)=> y & Text.From(x)

)

No RepliesBe the first to reply

Resources