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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors