Pivot tables in Google Sheets

Mariam Ispiryan
/
Mar 11, 2025
/
15
min read

Google Sheets has emerged as an indispensable tool for businesses, teams, and individuals alike. Among its most valuable features is the ability to create pivot tables. These tables enable advanced data analysis, empowering users to efficiently summarize, manipulate, and visualize vast datasets.

Pivot tables offer a dynamic method for organizing and presenting data, which simplifies the process of extracting significant insights and identifying trends. By reorganizing data based on specific categories or dimensions, pivot tables allow users to pivot or transpose their data and examine it from various angles.



This robust functionality proves particularly beneficial for:

  • Data aggregation: Effortlessly combine data from multiple sources or records using aggregation functions such as SUM, AVERAGE, COUNT, or MAX;
  • Trend identification: Analyze patterns and trends over time, across diverse categories, or between distinct datasets;
  • Data comparison: Facilitate comparisons across categories or groups, pinpoint outliers or critical data points, and comprehend the relationships among data elements;
  • Data exploration: Seamlessly navigate through various levels of data, transitioning from high-level summaries to intricate data points, in order to delve into and better understand the data.

Main components

Pivot tables in Google Sheets are composed of several key components that help you summarize, analyze, and visualize your data more effectively. The main components are:

  • Data source: the original dataset from which the pivot table is created;
  • Pivot Table editor: the interface in Google Sheets where you can configure and customize your pivot table;
  • Rows and Columns: the primary axes for organizing your data in a pivot table;
  • Conditional Formatting: a visual tool that helps you emphasize or highlight important data points in your pivot table based on specific conditions or criteria.

Data source

The data source is a crucial component of pivot tables in Google Sheets, as it refers to the original dataset used for creating the pivot table. The data source provides the foundation for your analysis and dictates how the pivot table is structured and organized.

Pivot Table editor

The Pivot Table editor is the interface used for configuring and customizing pivot tables in Google Sheets. It allows you to build and modify your pivot table by selecting the fields you want to include, applying aggregation functions, adding filters, and more.

The Pivot Table editor is organized into the following sections:

  • Data range, where you express what’s the area in your sheet that contains the dataset for the pivot table;
  • Rows and Columns, where you define the structure of your pivot table by selecting the fields you want to use as row or column labels;
  • Values, where you can add the fields you want to aggregate or summarize in your pivot table;
  • Filters, where you can apply filters to your pivot table based on specific fields;
  • Calculated Fields, where you can create custom metrics or formulas within the pivot table for advanced calculations or data manipulation;
  • Grouping, where you can organize and summarize data based on shared characteristics or criteria.

Rows and Columns

The rows and columns are key components of pivot tables in Google Sheets, as they define the structure and organization of your data within the table. They allow you to display and group data based on the fields you choose, providing a summarized and organized view of your data source.

Conditional formatting

Conditional Formatting is a visual tool in Google Sheets that helps you emphasize or highlight important data points in your pivot table based on specific conditions or criteria. It allows you to apply various formatting styles, such as text and background color, to cells that meet certain rules or conditions. This makes it easier to spot trends, patterns, or outliers in your data, which can ultimately enhance your data analysis and interpretation.

Example

To get a clearer picture of pivot tables, let's consider an example utilizing a dataset composed of sales data. This dataset encompasses information on sales transactions, namely the date, product, region, and generated revenue:

Pivot tables in Google Sheets

Suppose we want to analyze the total revenue generated by each product across different regions. We can create a pivot table to summarize this information, by configuring it as follows:

  • Rows: Product
  • Columns: Region
  • Values: SUM of Revenue

This is the resulting pivot table:

Confluence landing page

In this pivot table, we can quickly see the revenue generated by each product in each region, as well as the grand total for each product and region. This visualization makes it easy to identify trends, such as ProductB generating the highest revenue overall and ProductC having the highest revenue in the North region.

How to create a pivot table in Google Sheets

In this guide, we will use a dataset of sales data. There are three products: ProductA, ProductB, and ProductC. These are sold in three regions: North, South, East, and West. Therefore, each product is responsible for a certain amount of revenue, and so is each region. To figure out the revenue per product and the revenue per region, we will create a pivot table in Google Sheets.

Here’s how the final result will look like:

How to create a pivot table in Google Sheets

Follow the steps described next to create a pivot table in Google Sheets.

Step 1: Open your dataset in Google Sheets

Open the Google Sheets file that contains the data you want to analyze.

Open your dataset in Google Sheets

Step 2: Select the data you want to analyze

In your spreadsheet, select the cells that contain the data you want to include in the pivot table.

Select the data you want to analyze

Step 3: Navigate the menu to create the pivot table

In the menu bar of Google Sheets, click on “Insert,” then select “Pivot table.”

Navigate the menu to create the pivot table

Step 4: Click on “Create”

In the dialog window that shows up, choose whether you want to create the pivot table in a new sheet or an existing sheet, before clicking on "Create."

Click on “Create”

Step 5: Add “Product” as rows

In order to assign a line of the pivot table to every product, in the Pivot table editor, click on “Add” near “Rows” and select “Product.”

Add “Product” as rows

Step 6: Add “Region” as columns

In order for your pivot table to have a column for each region, in the Pivot table editor, click on “Add” near “Columns” and select “Region.”

Add “Region” as columns

Step 7: Add “Revenue” as values

Now, let’s populate your pivot table with data. In the pivot table editor, click on “Add” near “Values,” select “Revenue,” and you’re done.

Add “Revenue” as values

Advanced techniques

Advanced pivot table techniques significantly boost your data analysis capabilities and allow you to handle large datasets more efficiently. By utilizing these advanced techniques, you can tap into the full potential of this robust data analysis tool, optimize your workflow, and extract valuable insights from your data with greater effectiveness.

Five advanced pivot table techniques:

  • Calculated fields;
  • Conditional formatting;
  • Grouping data;
  • Slicers;
  • Pivot charts.

Calculated fields

In the context of pivot tables, calculated fields refer to custom formulas or expressions that allow you to create new data from the existing data in your pivot table. These fields help you perform calculations or apply functions to your data to derive meaningful insights and better understand your dataset.

Calculated fields

Calculated fields are useful for various purposes, such as:

  • Performing calculations: You can use calculated fields to perform arithmetic operations, such as adding, subtracting, multiplying, or dividing values in different columns of the pivot table.
  • Applying functions: You can apply various functions, such as COUNT, AVERAGE, MIN, MAX, etc. to summarize or analyze your data.
  • Combining data from multiple columns: Calculated fields can help you combine data from multiple columns to create new, meaningful information.

Conditional formatting

When working with pivot tables, conditional formatting lets you applying specific formatting rules, such as font color, background color, or text formatting, to cells within the pivot table based on certain conditions or criteria. This feature helps you visually emphasize or highlight important data points, patterns, or trends, making it easier to interpret and analyze the data in the pivot table.

Conditional formatting
Conditional formatting

You can apply conditional formatting to a pivot table in Google Sheets based on various criteria, such as:

  • Numeric conditions: You can apply formatting based on whether a cell's value is greater than, less than, equal to, or within a specific range.
  • Text conditions: Formatting can be applied if a cell's text contains, starts with, or ends with specific words or characters.
  • Date conditions: Formatting can be based on specific dates, or relative to today's date (e.g. highlighting cells with dates in the past, future, or within a specific range).
  • Custom formulas: You can create custom formulas to apply formatting based on more complex conditions.

Grouping data

Grouping data refers to the process of combining data points into categories or groups based on shared characteristics or criteria. This technique helps you better organize, summarize, and analyze your data, making it easier to identify patterns, trends, or relationships within the dataset.

Grouping data

You can group data in a pivot table based on various criteria, such as:

  • Numeric data: Grouping data points into ranges or bins, such as age groups, income brackets, or sales ranges.
  • Dates and times: Grouping data points by specific time periods, such as days, weeks, months, quarters, or years.
  • Text data: Grouping data points based on shared text attributes, such as product categories, geographic regions, or customer segments.

Slicers

Slicers are interactive filtering controls in Google Sheets that enable you and your collaborators to filter and visualize your data more easily. They can be connected to pivot tables, allowing users to filter data by selecting specific values or categories from the slicer. Slicers provide a more intuitive and visual way to filter data compared to the built-in filters in the Pivot Table editor.

After you’ve added a slicer, the pivot table will update automatically to show only the data that matches the selected values in the slicer. This technique is especially useful in reports or dashboards where you want to give viewers the ability to interact with and explore the data without modifying the underlying pivot table structure.

Pivot Charts

Pivot Charts are a powerful way to visualize your pivot table data in Google Sheets, as they provide a graphical representation of the information in your pivot table. They can help you identify trends, patterns, or relationships in your data more easily compared to looking at the raw numbers.

Google Sheets can automatically create a chart based on your pivot table data and link the chart to the pivot table, so any changes made to the pivot table will be reflected in the chart. Pivot Charts can be particularly useful in reports, presentations, or dashboards where you want to showcase the results of your data analysis in a visually engaging and easily digestible format.

Most common use cases

Pivot tables are highly versatile and can be applied to a wide range of scenarios for data analysis and reporting. Their most common use cases are sales analysis, financial reporting, survey data analysis, inventory management, and attendance tracking.

Sales Analysis

Pivot tables can help you analyze sales data to identify trends, top-performing products, and revenue-generating regions. For example, you can create a pivot table to display the total revenue generated by each product across different regions, by configuring it in the following way:

  • Rows: Product
  • Columns: Region
  • Values: SUM of Revenue

As the pivot table would display the total revenue for each product in every region, you’d easily identify the bestselling product and the top-performing region.

Financial Reporting

Pivot tables are an excellent tool for generating financial reports, such as income statements, balance sheets, or cash flow statements. For instance, you can create a pivot table to summarize expenses by category and month, by configuring it as follows:

  • Rows: Expense Category
  • Columns: Month
  • Values: SUM of Expense Amount

This pivot table would display the total expenses for each category by month, allowing you to monitor spending trends and identify areas for cost reduction.

Survey Data Analysis

Analyzing survey data often involves examining responses across various demographic groups or question categories. Pivot tables can help you explore the data and draw meaningful insights, if you set it up in the following way:

  • Rows: Age Group
  • Columns: Satisfaction Level (e.g. Very Satisfied, Satisfied, Neutral, Dissatisfied, Very Dissatisfied)
  • Values: COUNT of Responses

This pivot table would display the number of responses for each satisfaction level within each age group, enabling you to identify patterns and trends in customer satisfaction.

Inventory Management

Pivot tables can be used to track and analyze inventory levels, allowing you to identify patterns in sales, monitor stock levels, and plan for future demand. Here’s how you can set up a pivot table for this purpose:

  • Rows: Product
  • Columns: Warehouse Location
  • Values: SUM of Stock Quantity

This pivot table would show the stock levels of each product in different warehouse locations, helping you manage inventory more effectively and allocate resources as needed.

Attendance Tracking

In educational or professional settings, pivot tables can be utilized to track and analyze attendance records, highlighting trends and patterns in attendance or absence. To accomplish this, set up a pivot table in the following way:

  • Rows: Student Name (or Employee Name)
  • Columns: Month
  • Values: COUNT of Absences

This pivot table would display the number of absences for each student (or employee) by month, allowing you to monitor attendance and address any issues that may arise.

Best practices

To optimize the use of pivot tables in Google Sheets, you might want to consider following some best practices. These will allow you to create effective and easy-to-understand pivot tables that help you analyze and draw insights from your data more efficiently.

Organize your data

Organizing your data is crucial for creating effective and accurate pivot tables in Google Sheets. Ensure your source data is structured in a clean and consistent manner, with clear headers and no blank rows or columns. This will make it easier to create accurate and effective pivot tables.

To organize your data, consider arranging it in a tabular format, removing any blank rows or columns and duplicates, and using clear headers and consistent formatting.

Use meaningful headers

By using meaningful headers in your dataset, you'll enable a smoother and more efficient data analysis process when working with pivot tables in Google Sheets. Clear and descriptive column headers contribute to a well-organized and professional dataset, enhance the ease of understanding, streamline the data analysis process, and simplify collaboration among team members.

To create meaningful headers, aim to be descriptive yet concise, use consistent naming conventions and clear terminology, and avoid special characters or spaces.

Start with a simple layout

When working with pivot tables in Google Sheets, begin with a basic pivot table structure and gradually build upon it as needed. This way, your pivot tables will be easier to understand, especially when dealing with unfamiliar data, thereby making data exploration more manageable and reducing the risk of errors or misinterpretations.

In order to implement this best practice, identify the key data points in your dataset you want to analyze, before building a basic pivot table. Then you may refine and add complexity to your initial pivot table as needed.

Use filters strategically

It’s important to use filters in pivot tables in Google Sheets to concentrate on specific data subsets or exclude irrelevant data points. By doing so, you can improve your data analysis and help you identify trends or patterns more effectively.

Filter data based on specific criteria, so you can zero in on the data points that matter the most and reduce the noise. Using filters in this way makes it easier for you to identify patterns, trends, or anomalies, during your data analysis.

Leverage calculated fields

You can use calculated fields to create custom metrics, perform calculations, or combine data from multiple columns. In turn, you will be able to conduct a data analysis that is more advanced andIdentify the calculation: Determine the calculation you want to perform or the custom metric you want to create based on your data analysis requirements.

Ensure you provide a descriptive and meaningful name for your calculated field so that it’s easier to understand and work within the pivot table.

Group data

Grouping data based on shared characteristics or criteria helps to summarize, analyze, and understand your data. By analyzing a few groups, rather than many variables, it will be easier for you to learn insights from your data.

Apply conditional formatting

In pivot tables in Google Sheets, you can use conditional formatting to visually emphasize or highlight important data points. This makes it easier to interpret and analyze the data in the pivot table by drawing attention to specific values, trends, or patterns.

After you determine the criteria or conditions you want to use for applying conditional formatting, ensure the formatting will result in a contrast between what you want to highlight versus the remaining data points.

Avoid overloading

When working with pivot tables in Google Sheets, it’s important not to add too many fields or dimensions to your pivot table. While pivot tables are designed to handle large datasets, overloading them with excessive amounts of data can make it difficult to read, understand, and analyze the information effectively.

Make an effort to focus on only the most relevant data points for your analysis, thereby limiting the complexity of your pivot table.

Limitations

While pivot tables are a powerful and versatile tool for data analysis, they also come with certain limitations, such as data size constraints, data formatting requirements, and limited customization and visualization options. Understanding these can help you decide when to use pivot tables and when to explore alternative solutions.

Data size constraints

Pivot tables may perform poorly with very large datasets. Indeed, Google Sheets has a limit of 5 million cells per spreadsheet. For example, if you have a dataset containing 1 million rows and 10 columns, you would have 10 million cells, thereby exceeding the 5 million cell limit in Google Sheets.

As an alternative, you could consider using a dedicated data analysis tool, such as Microsoft Power BI, Tableau, or Google BigQuery.

Data Formatting Requirements

Pivot tables require data to be organized in a specific format, with each column representing a distinct variable. If your data is not structured in this manner, you will need to reformat or clean the data before creating a pivot table. This may be burdensome if, for example, your data is spread across multiple sheets or tables, for that would mean that you’d need to consolidate the data into a single table with uniform formatting before creating a pivot table.

To reformat and clean your data, consider using a database management system (e.g. SQL) or a data transformation tool (e.g. Google Sheets' QUERY function).

Limited Customization and Visualization Options

While pivot tables offer some customization options, they may not provide the level of flexibility or visual appeal required for certain presentations or reports. For example, your pivot table in Google Sheets might not might not allow you to create the desired chart type or apply specific formatting rules.

What is Softr
Softr is the easiest way to turn your data into powerful business apps—no code required. Connect to your spreadsheet or database, customize layout and logic, and share with your team or clients.

Join 700,000+ users worldwide, building client portals, internal tools, CRMs, dashboards, project management systems, inventory management apps, and more—all without code.
Get started free
Mariam Ispiryan

Categories
Google Sheets

Build an app today. It’s free!

Build and launch your first portal or internal tool in under 30 minutes
Get started free