Forum Discussion
mikeborg82
9 years agoAdvocate II
Table transformation (pivot unpivot????)
Table transformation... the top three rows are how the data appears, I want the data to look like it does below in one row... i assume this is possible, any ideas and help? Thank you so much. R...
- 9 years ago
Indeed, a little bit from both because this includes some logic I recntly learned from ImkeF
let Source = Table1, Grouped = Table.Group(Source, {"Rank", "Rating", "Number of ratings"}, {{"Names", each Table.FromRows({[Name]}), type table}}), Reordered = Table.ReorderColumns(Grouped,{"Rank", "Names", "Rating", "Number of ratings"}), ExpandedNames = Table.ExpandTableColumn(Reordered, "Names", Table.ColumnNames(Table.Combine(Reordered[Names]))), RenamedColumns = Table.TransformColumnNames(ExpandedNames, each Replacer.ReplaceText(_, "Column", "Name ")) in RenamedColumns
Greg_Deckler
9 years agoCommunity Champion
That's a question for MarcelBeug or ImkeF.
MarcelBeug
9 years agoCommunity Champion
Indeed, a little bit from both because this includes some logic I recntly learned from ImkeF
let
Source = Table1,
Grouped = Table.Group(Source, {"Rank", "Rating", "Number of ratings"}, {{"Names", each Table.FromRows({[Name]}), type table}}),
Reordered = Table.ReorderColumns(Grouped,{"Rank", "Names", "Rating", "Number of ratings"}),
ExpandedNames = Table.ExpandTableColumn(Reordered, "Names", Table.ColumnNames(Table.Combine(Reordered[Names]))),
RenamedColumns = Table.TransformColumnNames(ExpandedNames, each Replacer.ReplaceText(_, "Column", "Name "))
in
RenamedColumns- mikeborg829 years agoAdvocate II
wow, that is awesome!! It worked brilliantly.