Pivot columns

In Power Query, you can create a table that contains an aggregate value for each unique value in a column. Power Query groups each unique value, performs an aggregate calculation for each value, and pivots the column into a new table. For example, you could count the number of products in each product category.

Pivot Column Result

To pivot a column

  1. In the Query Editor ribbon, click Transform > Pivot Columns.

    Pivot Column Dialog
  2. In the Pivot Column dialog box, choose a column from Values Column. For example, choose Product Number.

  3. Expand Hide advanced options and choose an Aggregate Value Function. For example, choose Count (All).

  4. Click OK.


Given a products table with a ProductCategory and ProductNumber column, you can get the count of all products in each category.

Pivot Column Example
Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!