Forum Discussion
Unpivot multiple headers in a data
- Anonymous5 years ago
Try transpose and merge in power query to achieve your goal.
Firstly we need to duplicate your original table and transform them as below.
Sample Table(Table1):
Duplicate Sample to Table2 and Remove all column except Column1,2,3. And only keep last 4 rows in this table.
Remove Column1 and Column2 in Table1.
Transpose all columns in Table1.
Then select column6,7,8,9 and use unpivote function.
Finally, merge Table1 and Table2 by number column and expand table to get result.
Merge:
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try transpose and merge in power query to achieve your goal.
Firstly we need to duplicate your original table and transform them as below.
Sample Table(Table1):
Duplicate Sample to Table2 and Remove all column except Column1,2,3. And only keep last 4 rows in this table.
Remove Column1 and Column2 in Table1.
Transpose all columns in Table1.
Then select column6,7,8,9 and use unpivote function.
Finally, merge Table1 and Table2 by number column and expand table to get result.
Merge:
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico,
This helps big time. Thank you for your help.
Thanks
Srini