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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dle3
Frequent Visitor

Transpose table in Power BI Desktop

Hopefully someone can help me in transpose this table:

transpose1.png

 

Into that table:

transpose2.png

 

My idea was to iterate through the first table and add each row into the new table. But how can i loop through a table using Power BI M language or maybe you have a better way how to do that.

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Select the second column, Choose Transform - Pivot Column, with Values from the 3rd column, Advanced option "Don't Aggregate".

 

That should give you the desired result.

Specializing in Power Query Formula Language (M)

View solution in original post

2 REPLIES 2
MarcelBeug
Community Champion
Community Champion

Select the second column, Choose Transform - Pivot Column, with Values from the 3rd column, Advanced option "Don't Aggregate".

 

That should give you the desired result.

Specializing in Power Query Formula Language (M)

Dear,

Thanks for the great advice. For some reason, this didn't 100% work for us.

In our case it however aggregated it to 1 row, while we expect multiple rows (don't aggregate was chosen).

Any idea what could cause this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.