Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
San_Raz
Frequent Visitor

Pivoting table with repeated rows and multiple values

My refernce table is 

San_Raz_0-1709893730783.png

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

San_Raz_1-1709893855858.png

 

 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.

 

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

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

 

Screenshot_2.png

View solution in original post

Ahmedx
Super User
Super User

and pls try this code

 

View solution in original post

3 REPLIES 3
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

San_Raz_0-1710481950957.png


The full Power Query editor steps  is provided below

San_Raz_1-1710482020517.png

 

Ahmedx
Super User
Super User

and pls try this code

 

Ahmedx
Super User
Super User

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

 

Screenshot_2.png

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.