Sub topic 1
What a Pivot Table Does and When to Use One
Prerequisites
This chapter assumes that you can navigate Google Sheets, select a range, enter a basic formula, and recognize rows of records and columns of fields. You should also understand simple aggregations such as sum, count, and average.
The working model
A pivot table is a summary built from a larger table of records. It rearranges the fields in your source data so you can compare groups without manually writing a separate formula for each group.
Imagine a sales table with these fields:
| Date | Region | Product | Revenue |
|---|---|---|---|
| 2026-01-03 | West | Notebook | 120 |
Each row is one record. Each column is a field. A pivot table can group the records by Region and calculate the total Revenue for each region.
The result might look like this:
| Region | Total revenue |
|---|---|
| West | 120 |
| East | 95 |
The original records remain unchanged. The pivot table creates a separate view that summarizes them.
How a pivot table answers a question
Most pivot-table questions have three parts:
- Group: Which categories should appear as rows or columns? Examples include Region, Product, or Salesperson.
- Measure: Which numeric field should be calculated? Examples include Revenue, Quantity, or Cost.
- Calculation: How should the measure be combined? Common choices include Sum, Count, Average, Minimum, and Maximum.
For example, “What was the average revenue for each product in each region?” uses Product and Region as groups, Revenue as the measure, and Average as the calculation.
A pivot table is useful when you need to explore the same dataset from several angles. You can change the grouping or calculation in the pivot table editor instead of rebuilding formulas. This makes it useful for exploratory analysis, recurring reports, and checking patterns in operational data.
When to use one
Use a pivot table when:
- You need totals or averages by one or more categories.
- You want to compare categories quickly.
- You expect to change the question while exploring the data.
- You need a report that nontechnical users can adjust in the editor.
A pivot table may be less suitable when the output must follow a precise custom layout, feed a fixed application interface, or combine complex conditions. In those cases, formulas such as SUMIFS or QUERY can provide more direct control. A chart can communicate a finding more clearly, but it usually depends on a summary table first.
The central decision is whether you need a flexible summary or a fixed calculation. Choose a pivot table for fast grouping and comparison. Choose a formula when you need a result with an explicitly controlled location and logic.
Exercise
You have sales records with Date, Region, Product, and Revenue fields. You need total revenue for each region and expect to compare different groupings later. Which tool is a good first choice, and why?
Show answer
Use a pivot table. It can group the records by Region and sum Revenue, while allowing you to change the grouping later without rebuilding the summary.