How do I create a Pivot Table in Power BI? (With Example)

Creating a Pivot Table in Power BI involves using the “Pivot Table” visual option and selecting the desired data fields and summarization methods. For example, if you want to create a table that shows the total sales by product category, you would select the “Product Category” field in the Rows section, and the “Sales” field in the Values section. This will generate a table that displays the total sales for each product category. You can also add filters and slicers to further customize the data displayed in the Pivot Table.


The easiest way to create a pivot table in Power BI is to use the Matrix visualization.

Note: This is not to be confused with the Table visualization located directly next to it.

The following example shows how to create a pivot table in Power BI in practice.

Example: How to Create a Pivot Table in Power BI

Suppose we have the following table in Power BI named my_data that contains information about points scored by basketball players on various teams:

Suppose we would like to create a pivot table that summarizes the total points scored by team and position.

To do so, click the Report View icon on the left hand side:

Then click the Matrix icon under the Visualizations tab.

Then drag the Team field under the Rows label, the Position field under the Columns label and the Points field under the Values label:

This will produce the following pivot table:

Power BI pivot table

The rows show the names of the teams, the columns show the names of the positions, and the values inside the table represent the sum of points for each combination of team and position.

For example, we can see:

  • Centers on Team A scored a total of 30 points.
  • Forwards on Team A scored a total of 57 points.
  • Guards on Team A scored a total of 36 points.

And so on.

If you’d like, you can also use a different summary metric in the pivot table.

For example, you could display the average value instead of the sum of values by clicking the dropdown arrow next to Sum of Points, then clicking Average:

The pivot table will now display the average points scored by players on each team and position:

Feel free to use whichever summary metric you would like within your pivot table.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x