Sub topic 2
Recap of the pivot table editor
This chapter reviews the pivot table editor, the side panel where you build every pivot table in Google Sheets. Later chapters add groups and calculated fields to it, so you need to know which area each setting lives in. The chapter assumes you can navigate Google Sheets, write basic cell formulas, and read a table with one header row and one record per row. It also assumes you know what SUM, COUNT and AVERAGE do.
The running example
The rest of this tutorial uses one small table. Paste it into a sheet so it occupies A1:F6. The values are tab-separated, so pasting them places each value in its own cell.
Date Region Product Units Revenue Cost
2026-01-05 West Widget 10 250 150
2026-01-19 East Widget 4 100 60
2026-02-02 West Gadget 7 420 245
2026-02-23 South Gadget 3 180 105
2026-03-09 East Gizmo 12 600 420Check that the Date column is real dates, not text. Sheets right-aligns real dates by default. Chapter 1 of this series covered the cleanup steps in detail.
What a pivot table does
A pivot table summarizes a source range without changing it. You choose which columns become row labels, which become column labels, and which numbers are aggregated at each intersection. Sheets then computes the result. The source data stays as it was, and the pivot table is a separate, generated view of it.
Three properties of this design matter for the rest of the tutorial:
- The pivot table is read-only. You cannot type over a cell inside it. To change a result, you change the editor settings or the source data.
- It updates when the source changes. If you edit a value or add rows inside the source range, the pivot table recalculates.
- Each source column is a field. The editor refers to columns by their header text, and calculated fields use these same names in formulas.
Creating the pivot table
Follow these steps to create the pivot table:
- Click any cell inside the data, or select A1:F6.
- Choose Insert, then Pivot table.
- In the dialog, confirm the data range and choose New sheet or Existing sheet.
- Click Create.
Sheets opens the pivot table on its own sheet, with the editor panel on the right. If you click outside the pivot table, the panel closes. Click any cell in the pivot table to reopen it.
You can change the source range later by editing the range shown in the editor. This is how you extend the pivot table when your data grows beyond its original rows. A range such as A1:F extends to the bottom of the sheet, so rows you add below the data are included without further edits. A fixed range such as A1:F6 does not grow.
The editor also offers Suggested pivot tables for your data. These are useful for a quick start, but they give you less control than building from scratch. This tutorial builds tables by hand.
The four areas of the editor
The editor has four areas. Each has an Add button that lists the source columns by header name.
| Area | Purpose | What you can set |
|---|---|---|
| Rows | Fields whose items become row labels down the left side | Order, Sort by, Show totals |
| Columns | Fields whose items become column labels across the top | Order, Sort by, Show totals |
| Values | Numeric fields to aggregate in the body | Summarize by, Show as |
| Filters | Fields that limit which source rows are included | Filter by condition, Filter by values |
The Values area also holds calculated fields, which this tutorial covers from Chapter 7 onward. Open Add in Values and you see Calculated field next to the list of source columns.
Rows and columns
Each field you add to Rows or Columns lists its distinct items once. Add Region to Rows and you get one row for each of East, South and West. Add a second field, such as Product, and the items nest under the first field. Each product appears under each region where it occurs. The order of fields in an area matters. Region followed by Product gives a different layout from Product followed by Region.
Each Rows or Columns field has these settings:
- Order sets ascending or descending sorting.
- Sort by chooses whether to sort on the labels themselves or on one of the Values fields. Sorting by Revenue, for example, puts the highest-revenue region first.
- Show totals adds a total line for that field. Turn it off if the totals clutter the layout.
Sort order is a setting of the pivot field. Do not sort the pivot table's cells directly.
Values
Add Revenue to Values and the table shows one number for every row/column intersection. Each Values field has a Summarize by setting that decides how the source rows behind each cell are combined. It also has a Show as setting, which changes how the result is displayed, for example as a percentage. The next chapter covers both in detail.
You can add the same source column more than once. For example, you can add Revenue twice, once as a SUM and once as an AVERAGE, and label them side by side.
Filters
A filter removes source rows before any summarizing happens. Each filter field offers two ways to select data:
- Filter by values lists the field's items with checkboxes, so you can untick the ones to exclude.
- Filter by condition applies a rule, such as "Greater than" or "Text contains".
A filter field does not need to appear in Rows or Columns. You can filter on Product while only showing Region in the rows.
Worked example: revenue by region
Build a first pivot table on the sample data:
- In Rows, click Add and choose Region.
- In Values, click Add and choose Revenue. Leave Summarize by as SUM.
You should see this result:
| Region | SUM of Revenue |
|---|---|
| East | 700 |
| South | 180 |
| West | 670 |
| Grand Total | 1550 |
Now add Product to Columns. The grid expands to show revenue for each region and product pair. Combinations with no source rows, such as South and Widget, show as empty cells instead of zero. This is worth remembering when you later check a result against a formula.
You can verify any cell with a conventional formula on the source:
=SUMIFS(E2:E6, B2:B6, "West")For West this returns 670, the same as the pivot cell. Spot checks like this are the simplest way to confirm that a pivot table is reading the data the way you expect.
Filtering in the example
Add Product to Filters, open the dropdown, and untick Gizmo. The grand total drops from 1550 to 950, because the East Gizmo row of 600 is gone. The pivot table is now describing a subset of the source. Keep this in mind when you compare numbers between tables. A filter left on in one pivot table is a common reason two tables disagree.
Reading the layout correctly
The pivot table has predictable parts that you should recognize when verifying results:
- Header cells show the field name next to the summary type, for example "SUM of Revenue". These headers are generated by Sheets, and you can rename the label by clicking it and typing a new name.
- Total rows and columns are labelled "Grand Total" and calculate over the whole filtered set.
- Subtotals appear when a second field is nested in Rows or Columns and Show totals is on.
An important point is that a total row is not the sum of the displayed numbers. It is the aggregate recalculated on the underlying rows. For SUM and COUNT the two are the same. For AVERAGE they are not: the grand average of Revenue is computed from all five source rows, not as the average of the regional averages. The same distinction explains the ratio problems in Chapter 9.
Common editor problems
Some problems come up often enough that you should check for them before assuming something is wrong with your data.
| Symptom | Likely cause | Check |
|---|---|---|
| A new column does not appear in the field list | The source range ends before the new column | Edit the range in the editor |
| New rows are not counted | The range is fixed, such as A1:F6 | Use an open-ended range such as A1:F |
| A field has the wrong item names | Inconsistent spelling or trailing spaces in the source | Look for "West" versus "West " |
| Numbers show as counts instead of sums | Values summarized by COUNT, usually because the column holds text | Check that the cells are real numbers |
| Items appear as separate rows when they should be one | Text dates, or case or space differences | Normalize the source column |
Getting ready for grouping
Everything in later chapters builds on these basics. Grouping changes which items appear in Rows or Columns. Calculated fields add a new entry in Values. Keep these three facts in mind:
- Group and calculated-field changes are made in the editor, not in the source data.
- The field names in the editor are the source headers, so renaming a header in the source changes the field. Pick header names you are happy to use in formulas.
- Every change you make can be undone by changing the editor settings, because the source data is never modified.
Exercise
Using the sample data, you build a pivot table with Region in Rows and SUM of Units in Values. Then you add a filter on Product that excludes Gadget. What are the East, South and West values, and why does South disappear or show nothing?
Show answer
East is 16 (Widget 4 plus Gizmo 12), West is 10 (the Widget row only), and South has no rows left. Its only source row is a Gadget sale, and the filter removes source rows before aggregation. Because South has no remaining rows, it does not appear in the table.
Exercise
You add 20 new data rows below your pivot table's source range, which you selected as A1:F6, and the pivot table does not change. How do you fix this so future rows are included automatically?
Show answer
Edit the data range in the pivot table editor and change it to an open-ended range such as A1:F. Sheets then includes any rows added below the data. A fixed range such as A1:F6 ignores new rows.