How to Create a Pivot Table in Google Sheets

Pivot Tables in Google Sheets can be an incredibly useful tool for analyzing data. This article explain everything you need to know to effectively use Pivot Tables in Google Sheets.

6 Minutes
Table of Contents
  1. What are Pivot Tables?
  2. How to create a Pivot Table in Google Sheets
  3. Check the individual entries grouped under a row
  4. Capabilities of Google Sheets’ Pivot Tables
  5. How to use GETPIVOTDATA to access data stored in a Pivot Table
  6. How to delete a Pivot Table

A powerful feature of Google Sheets is the Pivot Table. It can be used to condense a large dataset into a small set of useful values for your data analysis. The Pivot Table can be daunting at first, but we have prepared this article and a set of tutorials for you to maximize the power of Pivot Tables. Are you ready?

What are Pivot Tables?

Google Sheets Pivot Tables are essentially Google Sheets’ answer to Excel’s PivotTable feature. The Pivot Table is designed to summarize a large amount of data stored in a small array. While by default this involves summing the columns, you can also add custom functions to find what you need for your analysis. 

What makes it advantageous? To be fair, you can replicate a Pivot Table using the existing functions of Google Sheets. However, that would be extremely time-consuming if you have a large amount of data that can easily reach hundreds of rows and possibly dozens of columns! It would be quite a hassle to compile a table manually. The Pivot Table comes in as the solution for that! You will discover the functionality it has while reading this article. 

How to Create a Pivot Table in Google Sheets

Inserting a Pivot Table is a straightforward process. 

Step 1: Click on any cell in the array of data, then click Insert on the main menu, then click Pivot table on the drop-down list that will appear.

Insert menu, Pivot table.

Step 2: A box will appear with some settings for your Pivot Table, including the range of data and whether you want to create a new sheet for it or not. By default, Google Sheets prefers that you create the Pivot Table in a new sheet. Click Create.

Create pivot table. Insert to new sheet option selected.

Step 3: The Pivot table generated is initially empty. 

Empty Pivot Table with the Pivot table editor on the right side of Google Sheets.

To add content, look at the Pivot table editor sidebar that appears on the right side of Google Sheets. First, we need to specify the rows. Click the Add button besides the Rows label. A drop-down list of columns from the source array will appear. Select the column label appropriate to your purpose. For our case, we will use the Items column.

Pivot table editor. Rows Add button clicked. A list of columns are shown. 

What Google Sheets does here is to scan all the values under the item column, list the unique values, and then aggregate all the rows by each unique value. The Pivot Table now looks as follows:

Pivot table with row labels. The data is yet to be selected.

Step 4: We can now specify the values to aggregate in the Pivot Table. By default, the sum of the values under a certain column is calculated and shown. Click the Add button besides the Values label. The list of column labels will appear again. Select the column label appropriate to your purpose. For our case, it’s the profit column.

Pivot table editor. Values Add button clicked. A list of columns are shown. 

 

The result is:

Google Sheet Pivot Table with item as row labels and the SUM of profit as the values.

You can repeat Step 4 to add more columns as you need.

In the next section, we will explore further the capabilities of Pivot Table.

Check the individual entries grouped under a row

If you need to check the individual entries grouped under a row, you can simply double-click on the specific cell. A new sheet will appear, listing all the entries grouped under it. 

New sheet generated to list the entries grouped in a row.

Capabilities of Google Sheets’ Pivot Tables

Google Sheets’ Pivot Table is not just for summarizing the values of a column. You can do so much more! Here are some of the features:

  1. Summarizing values by date and time. One of the most common criteria to summarize entries is to summarize by date and time. You will need to do a few tricks to make it work. Check our tutorial to learn more about it.
  1. Alternatives for summarizing values instead of SUM. By default, the values are aggregated into SUM; however, this formula is not the only option. You can aggregate it and get a different value. Some of the other formulas are listed below:

These are not the only alternatives; click here to learn more about the wide range of aggregation functions for Pivot Tables

  1. Add a custom formula to the Pivot Table. Sometimes the source sheet does not have a column for the data you need, and you cannot modify the source sheet. If the built-in functions listed above are not enough, you can add a custom formula on the Pivot Table. Check our tutorial on adding a custom formula to the Pivot Table
  1. Sort the row labels. You can sort the row labels in either ascending or descending order. A drop-down box for it will appear for appropriate columns, click it to choose between Ascending or Descending order. Click here to learn more about sorting entries in the Pivot Table.
Order options alongside Sort by option.

  1. Format the Pivot Table. You can also format a Pivot Table to improve its look and change how it displays the information. Learn more by reading our tutorial on formatting Pivot Tables in Google Sheets.
  1. Consolidate data from several sheets. If your data stretches over several sheets but you need to consolidate them into a single Pivot Table, you can use the QUERY function to combine them. Check out this tutorial to know how to use the QUERY function alongside the Pivot Table. 

How to use GETPIVOTDATA to access data stored in a Pivot Table

A useful function you can use to further process the data in the Pivot Tables is the GETPIVOTDATA. Instead of requiring you to pinpoint the exact cell where the data is stored inside the Pivot Table (it is possible), the GETPIVOTDATA helps you find the data given the attributes you are familiar with, the column and row headers you have specified in the source sheet. You can learn more by accessing our tutorial on using GETPIVOTDATA here. 

GETPIVOTDATA in action. Using the strings stored in other cells to find values in the Pivot Table.

How to delete a Pivot Table

If you no longer need a Pivot Table, you can opt to delete it by clicking the upper-leftmost cell. There are other ways of deleting a Pivot Table that you can use as well

Enter Your Email Below to Try Lido for FREE!

Experience all of the benefits of the classic spreadsheet with much more powerful features that save users time!
  • One Click Data Imports From Anywhere
  • Transform Spreadsheets into Software in Seconds
  • Pre-built & Custom Templates
  • Visualize Real-Time Data in Centralized Dashboards
100% FREE - No Credit Card Required