Forum Discussion

dle3's avatar
dle3
Frequent Visitor
8 years ago
Solved

Transpose table in Power BI Desktop

Hopefully someone can help me in transpose this table:

 

Into that table:

 

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.

  • 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.

2 Replies

  • MarcelBeug's avatar
    MarcelBeug
    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.

    • JJ3000's avatar
      JJ3000
      Frequent Visitor

      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?