Forum Discussion
Rahulmg2002
3 years agoFrequent Visitor
unpivot table
Hello friends,
I would like to unpiot m data in PowerBI . To explain it better i am attahcing images. please let me know how i can get this result an how. many thanks
Hi,
you can do this with a few steps in power query,
- Duplicate your table
- Delete the response columns in table 1
- Delete the Item columns in table 2
- Unpivot the columns in both tables
- Add an index column to both tables
- Select the first table and merge queries with the 2nd table matching on the index column
- expand the table field and select only the attribute field
- delete the attribute and Index column from table 1
- Rename your columns Item and Response
starting:
Result:
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
2 Replies
- DOLEARY85Resident Rockstar
Hi,
you can do this with a few steps in power query,
- Duplicate your table
- Delete the response columns in table 1
- Delete the Item columns in table 2
- Unpivot the columns in both tables
- Add an index column to both tables
- Select the first table and merge queries with the 2nd table matching on the index column
- expand the table field and select only the attribute field
- delete the attribute and Index column from table 1
- Rename your columns Item and Response
starting:
Result:
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
- Rahulmg2002Frequent Visitor
thank you DOLEARY85 , i will give it a go and let you know how it goes.