Forum Discussion

San_Raz's avatar
San_Raz
Frequent Visitor
2 years ago
Solved

Pivoting table with repeated rows and multiple values

My refernce table is 



I need to  transform this cross table into something like as provided in the below screenshot

 

 I tried pivoting and transposing rows to columns. The only challenge with transposing is that,  the column headers are gettig repeated.
If someone can provide the exact power Query Steps to achieve the desired transforamtion.

 

3 Replies

  • Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

     

  • San_Raz's avatar
    San_Raz
    Frequent Visitor

    Hi Ahmedx ,

    Thank you so much for the solution. It worked well for me.


    I also have found out the workaround to perform the same operation using the normal transpose and pivot functions in the power Query Editor.
    The key is to add a reference column for athletes and fill down, which will act as index column while doing the final pivotting as shown below


    The full Power Query editor steps  is provided below