Forum Discussion
How to use a PivotTable with unique columns?
- Sep 15, 2019
Since your data on Responses Tab was already in pivoted form, I used Power Query to transform and UnPivot the data on Responses Tab to create a Pivot Table on a New Sheet (Green Tab).
To do that, I converted the data on Responses Tab into an Excel Table and named it "Responses", loaded the data into the Power Query, removed the TimeStamp column as it was not required in the Pivot Table to be created, UnPivoted all the columns, renamed the columns and loaded as a Pivot Table Report on a New Sheet.
See if this is what you were trying to achieve.
Thanks for making that! I appreciate it, but it's not quite what I'm looking for.
Here's an example of what I'm dealing with, in the PivotTable sheet you can see the exact table I'm trying to work with. I'm not sure what to put in the Columns section if it can only handle one column at a time from my Responses sheet.
Since your data on Responses Tab was already in pivoted form, I used Power Query to transform and UnPivot the data on Responses Tab to create a Pivot Table on a New Sheet (Green Tab).
To do that, I converted the data on Responses Tab into an Excel Table and named it "Responses", loaded the data into the Power Query, removed the TimeStamp column as it was not required in the Pivot Table to be created, UnPivoted all the columns, renamed the columns and loaded as a Pivot Table Report on a New Sheet.
See if this is what you were trying to achieve.
- JoeDon16Sep 15, 2019Copper ContributorThank you for explaining that! I'll try to recreate what you did in that file, thank you very much for sharing it 🙂
- Subodh_Tiwari_sktneerSep 15, 2019Silver Contributor
You're welcome!
If you convert your data on Responses Tab into an Excel Table and name it "Responses", you can create a blank query and in the Advanced Editor, you may paste the following query and load it as Pivot Table Report on a New Sheet.
Just remember to change the name of the Table on Responses Tab in the first line of the query below...
Source = Excel.CurrentWorkbook(){[Name="Responses"]}[Content],
let Source = Excel.CurrentWorkbook(){[Name="Responses"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"Timestamp", type datetime}, {"What is Your Current Rank on Tank Role?", type text}, {"What is Your Current Rank on Damage Role?", type text}, {"What is Your Current Rank on Support Role?", type text}}), #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Timestamp"}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {}, "Attribute", "Value"), #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns",{{"Attribute", "Roles"}, {"Value", "Rank"}}) in #"Renamed Columns"
- JoeDon16Sep 15, 2019Copper Contributor
Beautiful!
Alright, thank you to everyone who helped me out here! I've got all my Pivots working and now have a little bit of a better understanding of Power Query. Going to finally go to sleep now, thanks again guys!