Forum Discussion

HFG's avatar
HFG
New Member
3 years ago
Solved

Pivoting multiple columns side by side

Hi all,    I'm very new to Power Query and don't know much about M so I'm turning to you for help. I have a table of repair tickets with a line per ticket  and multiple "Reason" columns and the sam...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi HFG ,

     

    Here's my solution.

    Sample data:

     

    1.Duplicate it.

    2.In Table, select only reason columns and unpivot them, remove all photo columns.

    3.Split Attribute column.

    4.Remove Attribute.1 column.

    5.In the duplicated table, follow the same steps as before, but keep the Photo columns and remove the Reason columns.

     

    6.Merge them. You need to notice that there are two matching columns.

     

    7.Expand them and remove unneeded columns, rename them.

     

    You can download my attachment for more details.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.