Forum Discussion
Grouping multiple rows into one
An additional query appears to me as follows, there is some way for the assignee and requester data to appear in a single row and not two as shown.
Hello Syndicate_Admin ,
yes you could merge the two columns into one, check how https://youtu.be/qG_SGa53XKA?si=z1MTLGg0cxLSFAIi
- Anonymous2 years ago
Hi Syndicate_Admin ,
Hope all is going well.
According to your demand description, the same ID displays the assignee and requester data in one row. The most suitable method is pivot and unpivot. The operation steps are as follows:
1. This is the original data, please change it according to your actual situation.
2. Select the ID column in Power Query, select Transform>>Unpivot Columns>>click the drop-down box and select Unpivot Other Columns.
After the operation is completed, the page should look like the following picture:
3. Select the Attribute column in Power Query, select Transform>>Pivot Column, and select Value for "Values Column" in the pop-up window.
After the operation is completed, the page should look like the following picture:
Attached below are some official documentation links for you to learn more about Pivot and Unpivot.
Pivot columns - Power Query | Microsoft Learn
Unpivot columns - Power Query | Microsoft Learn
Power BI Desktop files are attached.
If you have any other questions, please feel free to contact me. I am very grateful for your patience and cooperation.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
3 Replies
- IdrissshatilaSuper User
Hello Syndicate_Admin ,
yes you could merge the two columns into one, check how https://youtu.be/qG_SGa53XKA?si=z1MTLGg0cxLSFAIi
- AnonymousNot applicable
Hi Syndicate_Admin ,
Hope all is going well.
According to your demand description, the same ID displays the assignee and requester data in one row. The most suitable method is pivot and unpivot. The operation steps are as follows:
1. This is the original data, please change it according to your actual situation.
2. Select the ID column in Power Query, select Transform>>Unpivot Columns>>click the drop-down box and select Unpivot Other Columns.
After the operation is completed, the page should look like the following picture:
3. Select the Attribute column in Power Query, select Transform>>Pivot Column, and select Value for "Values Column" in the pop-up window.
After the operation is completed, the page should look like the following picture:
Attached below are some official documentation links for you to learn more about Pivot and Unpivot.
Pivot columns - Power Query | Microsoft Learn
Unpivot columns - Power Query | Microsoft Learn
Power BI Desktop files are attached.
If you have any other questions, please feel free to contact me. I am very grateful for your patience and cooperation.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!- Syndicate_AdminAdministrator
Thank you helped me move forward with my project