Forum Discussion
Difficulty in unpivoting Table
- 9 years ago
1) Select Employee Name, Employee Number and Column 2 - Unpivot Other Columns
2) Select Column 2 - Pivot Column - Values Column select Value - Don't Aggregate
3) Rename Attribute Column (rearrange columns if you want)
Hope this helps! :smileyhappy:
Got it:
- Duplicate your table
- In original table, remove column 2
- In orginal table, highlight the Employee Name and Number column, then right click and select "Unpivot Other Columns"
- In dupe table, remove the Employee Name, Number and Column 2 columns
- Demote headers
- Transpose table
- Rename columns (Course Name, Frequency, etc.)
- Create a Merge Query
- Select original table
- Select Merge Queries as New
- Select the "Attribute" column in original table
- Select "Course Name" column in dupe table
- Set Join Kind to Left Outer
- In Merged table, select Attribute column and remove dupes
- Remove the "Value" and "Attribute" column
- Expand the NewColumn column (with the nested tables)
Done!
1) Select Employee Name, Employee Number and Column 2 - Unpivot Other Columns
2) Select Column 2 - Pivot Column - Values Column select Value - Don't Aggregate
3) Rename Attribute Column (rearrange columns if you want)
Hope this helps! :smileyhappy:
- dkay84_PowerBI9 years agoMicrosoft Employee**bleep** it Sean! You outdid me again! Plus a video... you're just showing off
Wow the word D A M N gets bleeped out?!- New2PowerBI9 years agoHelper III
Wow! Thank you!!! I knew it had to be a two-step "something" but just couldn't figure it out. I met with someone here at work yesterday for close to an hour and they couldn't figure it out. :-(
Amazing! Thank you!!! Loving the help and support in this community and looking forward to sharing with others! :-)