Forum Discussion
Anonymous
2 years agoNot applicable
How to make new columns from values from another column?
Sorry if this has been asked before. I've searched but maybe my wording on my searches isn't finding what I'm trying to accomplish. I have a set of data and I've created an example to go by and a...
- 2 years ago
Hi Anonymous,
I'm attaching a excel file with my solution.
My M code is this:let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"Question", type text}, {"Answer", type text}}), #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Question]), "Question", "Answer") in #"Pivoted Column"
_AAndrade
2 years agoResident Rockstar
Hi Anonymous,
I'm attaching a excel file with my solution.
My M code is this:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"Question", type text}, {"Answer", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Question]), "Question", "Answer")
in
#"Pivoted Column"