Forum Discussion
tgjones43
7 years agoHelper IV
Pivot query
Hello. Please can someone advise how I can go from the first table to the second table? Each number, in column A, has a name in column B and occupies one to several rows depending on how many paramet...
- 7 years ago
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"Number", Int64.Type}, {"Name", type text}, {"Parameter", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each "Yes"), #"Pivoted Column" = Table.Pivot(#"Added Custom", List.Distinct(#"Added Custom"[Parameter]), "Parameter", "Custom") in #"Pivoted Column"
tgjones43
7 years agoHelper IV
Hi LivioLanzo Thanks, can I do this in the Query Editor? If so, I can't work out how sorry.
LivioLanzo
7 years agoSolution Sage
Hi tgjones43
it is possible to do it within Power Query but it would require more steps and be less efficient