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

%3CLINGO-SUB%20id%3D%22lingo-sub-2254486%22%20slang%3D%22en-US%22%3EConvert%20two%20columns%20so%20that%20they%20appear%20below%20each%20other%20(C%26amp%3BD%20goes%20below%20A%26amp%3BB%20and%20so%20on)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254486%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20Power%20Query%20I%20have%20a%20table%20that%20converts%20a%20list%20of%20player%20and%20their%20points%20to%20rows.%20What%20do%20I%20need%20to%20change%20in%20the%20table%20that%20will%20convert%20it%20back%20from%20rows%20to%20to%20columns.(Columns%20A%20%26amp%3B%20B%20then%20columns%20C%20%26amp%3B%20D%20are%20placed%20below%20A%20%26amp%3B%20B%20and%20so%20on)%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESource%20%3D%20Excel.CurrentWorkbook()%7B%5BName%3D%22Table1%22%5D%7D%5BContent%5D%2C%3C%2FP%3E%3CP%3EChangedTypes%20%3D%20Table.TransformColumnTypes(Source%2C%3C%2FP%3E%3CP%3E%7B%7B%22Players%22%2C%20type%20text%7D%2C%20%7B%22Pts%22%2C%20Int64.Type%7D%7D%3C%2FP%3E%3CP%3E)%2C%3C%2FP%3E%3CP%3EThe%20table%20below%20allows%20columns%20A%26amp%3BB%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3ESplittedTable%20%3D%20Table.Split(ChangedTypes%2C%2011)%2C%3C%2FP%3E%3CP%3EEachTableToColumns%20%3D%20List.Combine(%3C%2FP%3E%3CP%3EList.Transform(SplittedTable%2C%20Table.ToColumns)%3C%2FP%3E%3CP%3E)%2C%3C%2FP%3E%3CP%3EToTable%20%3D%20Table.FromColumns(EachTableToColumns%2C%3C%2FP%3E%3CP%3EList.TransformMany(%7B1..List.Count(EachTableToColumns)%20%2F%202%7D%2C%20each%20%7B%22Team%20%22%2C%22Pts%20Team%20%22%7D%2C%3C%2FP%3E%3CP%3E(x%2Cy)%3D%26gt%3B%20y%20%26amp%3B%20Text.From(x)%3C%2FP%3E%3CP%3E)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2254486%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

 

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)

)

0 Replies