Pivoting on multiple measures
This page shows how to pivot data that has more than one measure, so that every product has a column for each measure.
The data below has one row per sale, with the date, the product, and two measures, Amount and Unit:

The aim is to show the amount and the units side by side for each date, separately for bikes and for cars, which means four measure columns: bike amount, bike units, car amount and car units. Pivot Column on its own pivots only one values column, so the two measures first have to be brought into one column.
1. Load the data into Power Query
Section titled “1. Load the data into Power Query”In the Power Query editor, the data looks like this:

2. Unpivot the measures
Section titled “2. Unpivot the measures”- Select the Amount and Unit columns.
- Right-click, and choose Unpivot Columns.

Each sale now takes two rows, one for each measure, with the measure’s name in Attribute and its figure in Value:

3. Merge the product and measure names
Section titled “3. Merge the product and measure names”- Select the Product and Attribute columns, right-click, and choose Merge Columns.

- Choose –Custom– as the separator, and enter a full stop.

The new Merged column combines the two names, such as Bike.Amount and Car.Unit:

4. Pivot the data
Section titled “4. Pivot the data”- Select the Merged column, then click Pivot Column on the Transform tab.
- Choose Value as the Values Column, and keep Sum as the Aggregate Value Function.

- Change the Date column’s data type to Date.
The data now has one row per date, with a column for each product and measure:

- Click Close & Load to load the result to Excel.