Forum Discussion
Rearrange columns and rows in table
Hello community 🙂
Is there anyway to rearrange columns and values? Quite struggling to re-arrange columns for the Gantt Chart.
For example, my data table is like this:
(To explain data little bit details, once model finished step 1 it started step 2 duration and it keeps going to step 5 and it finished operation)
I want to make table like this:
Is there any method to convert table like this? Currently, my data has over 30000 unique id so it's not easy that i thought..
If anyone knows to convert table like this please let me know!
Thank you so much for your help and happy halloween 🙂
Kind regards,
jean
Hi, heejinyune
You can try the following methods.
In Power Query, copy the tables into five copies, leaving only 2 columns for each table.
Table1 and Table2:Select the Step 1 column in Table 1 and click Unpivot Column. The result is shown in the figure.
Other tables are also set up like this.
Finally, use the Append function to add several tables to one table.
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-zhangti
Community Support
Hi, heejinyune
You can try the following methods.
In Power Query, copy the tables into five copies, leaving only 2 columns for each table.
Table1 and Table2:Select the Step 1 column in Table 1 and click Unpivot Column. The result is shown in the figure.
Other tables are also set up like this.
Finally, use the Append function to add several tables to one table.
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Shahfaisal
Solution Sage
Can you try Unpivot - https://www.youtube.com/watch?v=YexVR-U565c