The following step-by-step example shows how to create a pivot table in Google Sheets that displays the count of occurrences of values.
Step 1: Enter the Data
First, let’s enter the following data that shows the total revenue generated by certain products in certain regions for some company:
Step 2: Create the Pivot Table
To create a pivot table that summarizes this dataset, click the Insert tab and then click Pivot table:
In the window that appears, type in the range of the data to use for the pivot table and select a cell in the existing sheet to place the pivot table:
Once you click Create, an empty pivot table will automatically be inserted.
In the Pivot table editor that appears on the right side of the screen, click Add next to Rows and choose Region.
Then click Add next to Rows and click Product:
Then click Add next to Values and click Revenue:
By default, the pivot table will attempt to summarize the Revenue values by using SUM.
To instead display the COUNT of Revenue, click the dropdown arrow under Summarize by and click COUNT:
The pivot table will update to show the count of occurrences by region and by product:
For example, we can see:
- Product A occurred 2 times in the East region.
- Product B occurred 1 time in the East region.
- Product C occurred 1 time in the East region.
And so on.
The following tutorials explain how to perform other common operations in Google Sheets: