Sub topic 4
Getting around the pivot table editor
This chapter assumes you can create a pivot table from a clean source range (covered in the previous chapter) and that you know what a row, a column and a sum are. Here you learn what each part of the editor does, so you can build and change a pivot table without guessing.
Opening the editor
The editor is a side panel on the right of the sheet. It opens when you click any cell inside a pivot table. It closes when you click outside the table, and it can be reopened by clicking a cell in the table again.
If the panel does not appear, check three things:
- You clicked a cell that belongs to the pivot table, not a blank cell beside it.
- The panel was not collapsed. Look for a small arrow at the right edge of the window.
- You are on the sheet that holds the pivot table. The source data lives on a different sheet, and clicking there shows nothing.
The examples in this chapter use a sheet named Sales with a header row in row 1. Column B is Region, column C is Product, column D is Units and column E is Revenue.
The layout of the panel
The panel has a fixed order from top to bottom. Learning it once saves time later.
| Area | What it controls |
|---|---|
| Suggested | Ready-made pivot layouts that Sheets builds from your headers. Shown only when the table is empty or when you open the panel on a new pivot. |
| Data range | The cells the pivot reads from. Editable. |
| Rows | Fields whose unique values become row labels. |
| Columns | Fields whose unique values become column headers. |
| Values | Fields that get summarized, one number per row and column intersection. |
| Filters | Fields used to include or exclude records before summarizing. |
Each area has an Add button. Clicking it lists every header from the source range, and you pick one. The same field can appear in more than one area, with one exception: a field used for a measure is normally in Values, and a field used as a label is in Rows or Columns.
Data range and the source
The data range box at the top shows the source, for example Sales!A1:E500. Click the grid icon beside it to select a new range with the mouse, or type the range directly.
Two details matter here:
- The range must include the header row. Sheets uses row 1 of the range as field names. If you leave the header out, the first record becomes a field name, and one record disappears from the totals.
- A fixed range such as
A1:E500does not grow when you add row 501. An open range such asSales!A1:Eincludes all rows to the bottom of the sheet. Chapter 11 covers this in full. For now, prefer the open form when you are building the table.
Adding and arranging fields
Click Add next to Rows and choose Region. The table immediately lists each region once. Click Add next to Values and choose Revenue. Each region now shows a total.
You can rearrange fields without removing them:
- Drag a field card up or down inside one area to change nesting order. With
RegionaboveProductin Rows, products are grouped under each region. Swapping them groups regions under each product. - Drag a field card from Rows to Columns to turn row labels into column headers. This is the quickest way to try a different layout.
- Click the X on a card to remove the field. The source data is not changed.
Order matters because nested fields are shown as an outline. The outer field gets a subtotal row and the inner field is repeated under every outer value.
The diagram shows the order of operations: filters remove records first, then rows and columns decide where each record lands, then values combine the records that landed together.
The card options
Every field card has its own controls. These differ by area, but the common ones are below.
Rows and Columns cards
- Order: Ascending or Descending. Sets the sort direction for the labels.
- Sort by: Sorts by the label itself or by one of the Values fields. Sorting by
SUM of Revenueputs the largest region first. - Show totals: A checkbox that adds a total row or column for this field.
- Repeat row labels: Available in newer versions. It fills the outer label on every row, which helps if you plan to copy the output elsewhere.
- Show values as: Not on these cards. It belongs to the Values card, described next.
Values cards
- Summarize by: SUM, COUNT, COUNTA, AVERAGE, MIN, MAX and others. The default is SUM for numeric fields and COUNTA for text fields.
- Show as: Default, or a percentage of row, column or grand total.
- Name: Not editable on the card itself. Edit the header cell in the table if you want a different label, or accept
SUM of Revenue.
Filters cards
Each filter card has a Status drop-down. Its two options are to show all items, or to show only those you tick. A filter can also be built from a formula using Filter by condition.
Reading what the table tells you
Hover over a column header or row label and Sheets does not show a tooltip, so rely on the card labels. A header such as SUM of Revenue tells you the function and the field. If the header reads COUNTA of Revenue when you expected a sum, the field was treated as text. The usual cause is numbers stored as text in the source. Fix the source, then refresh the pivot by clicking a cell in it.
You can also click any value cell in the pivot table and choose View details from the right-click menu. Sheets creates a new sheet that lists the source records behind that number. This is the quickest check that a total is built from the rows you expect.
Common editor mistakes
Most problems at this stage come from the same few causes.
- Blank headers in the source. Sheets refuses to build the table and shows an error that a header is missing. Give every column a name.
- A merged cell in the header row. The merged range hides the second header. Unmerge before building the pivot.
- A field in both Rows and Values with the wrong function. If
Revenueis in Rows, every distinct revenue becomes its own row. Remove it from Rows and keep it only in Values. - Dragging a card into Filters by accident. The table will show fewer records than expected. Open each Filters card and confirm that Status shows all items.
- Editing cells inside the pivot output. The table is generated. Typing over it is not allowed, and Sheets shows a warning. Change the editor, not the output.
A short worked pass
This sequence builds the West revenue view and tests it. Each step uses only the editor.
- Click inside the pivot table to open the panel.
- Confirm the data range reads
Sales!A1:E. - In Rows, add
Region. - In Values, add
Revenueand leave Summarize by as SUM. - In Filters, add
Productand tick only the products you want. - Click the card for
Regionand set Sort by toSUM of Revenue, descending. - Right-click the West total and choose View details to confirm the underlying rows.
If the West total on the pivot table disagrees with the detail sheet, one of the filters is set differently from what you assumed. Compare that to a formula cross-check outside the pivot, such as:
=SUMIFS(Sales!E:E, Sales!B:B, "West")That formula ignores pivot filters, so it matches the pivot only when every Filters card shows all items.
Exercise
A pivot table shows COUNTA of Revenue instead of SUM of Revenue, and the numbers look like record counts. Name the most likely cause and give two steps to fix it.
Show answer
The Revenue values in the source are stored as text, so Sheets treats the field as text and defaults to COUNTA. Fix it by converting the source cells to numbers (for example, remove currency symbols typed as text, or reformat the column as Number), then change Summarize by on the Revenue card to SUM if it does not switch on its own.
Exercise
You add Product to Rows above Region. The table now lists products first with regions nested underneath. How do you reverse the nesting without removing either field?
Show answer
Drag the Region card above the Product card inside the Rows area. The order of cards in an area sets the nesting order.