How to pivot multiple measures and columns in Power Query and Power BI

The pivot-function in Power Query lets you pivot your data within the query already. This comes in handy quite often when you want to further work on those results within the query. There’s not much to parametrise in the function, so the question is how to handle it when you want more than one measure/value to be returned.
Let’s say you have a table like this:


And it shall look like this:


You first unpivot your measure columns:


Resulting in this:


Now merge Product & Attribute in order to create your new header column:


On this new column you now perform your new pivot operation:


& voilà: Pivot multiple measures in Power Query and Power BI:


You can download the file: Pivot multiple columns

Enjoy & stay queryious 🙂

Comments (6) Write a comment

  1. This is fantastic. The steps worked flawlessly for what i was trying to do.


  2. Thank you so much! These problems would be really hard without clear documentation like yours!


Leave a Reply

Die Datenschutzbestimmungen finden Sie hier: / Please find the privacy policy here: