Sub topic 3
How Values Are Summarized
This chapter assumes that you can create a pivot table, add fields to Rows, Columns, Values, and Filters, and use basic formulas such as SUM, COUNT, and AVERAGE. You should also have a source table with one header row and one record per row.
A pivot table does not display every source row. It groups rows by the fields in Rows and Columns, then applies an aggregation to each group. An aggregation is a rule that combines several values into one result.
Choose a summary in the Values section
When you add a field under Values in the pivot table editor, Google Sheets chooses a default summary, often SUM for numbers. Open the value field and change Summarize by when another result better matches the question.
| Summary | What it returns | Example question |
|---|---|---|
| SUM | Adds numeric values | How much revenue did each region produce? |
| COUNT | Counts numeric values | How many rows have a numeric Units value? |
| COUNTA | Counts non-empty values | How many products were recorded? |
| AVERAGE | Calculates the arithmetic mean | What was the average order size? |
| MAX or MIN | Finds the largest or smallest value | What was the highest revenue in each region? |
For the source data below, a pivot with Region in Rows and Revenue in Values summarized by SUM produces these regional totals:
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 420- East: 700
- South: 180
- West: 670
- Grand total: 1,550
The grand total is calculated from the source values for the whole pivot, not by adding formatted display values that might have been rounded.
Understand how each rule treats blanks
Summary rules treat empty and nonnumeric cells differently. SUM ignores blank cells and text. COUNT counts numeric cells only. COUNTA counts any non-empty cell, including text. AVERAGE uses numeric cells and ignores blanks, so a missing value does not count as zero.
This distinction matters when a blank means “not recorded” rather than “zero.” Replacing missing revenue with zero changes both the sum and the average. Decide what the blank means before interpreting the pivot.
> callout warning > Do not use COUNTA as a row count when the value column may contain labels, spaces, or formulas that return an empty string. Choose a consistently populated field, such as an order ID, or inspect the source data first.
Compare averages with totals
A pivot can summarize the same field in different ways. For example, SUM of Units answers how many units were sold. AVERAGE of Units answers the average units per source row. These are different measures.
If East has Units values of 4 and 12, its sum is 16 and its average is 8. The average is based on source records, not on regions or other visible groups. If you add another grouping field, the average is recalculated separately for every resulting group.
You can add the same source field to Values more than once. For example, add Revenue once as SUM and again as AVERAGE. Give each value a clear custom name so readers can distinguish total revenue from average revenue.
Use custom summaries carefully
A calculated field or custom summary can express a formula, but the order of operations matters. Consider revenue per unit. The reliable group-level formula is:
=SUM(Revenue) / SUM(Units)For East, this is 700 / 16, or 43.75 revenue per unit. It is usually different from averaging each row's revenue-per-unit result, because rows may contain different numbers of units.
A pivot summary is correct only when its aggregation matches the question. Use SUM for totals, COUNT or COUNTA for records, and AVERAGE for a typical source row. Use a custom aggregated formula when you need a ratio of group totals.
> exercise > Q: A region contains three rows with Revenue values of 100, 200, and 700. Which pivot summary gives total revenue, and which gives the average revenue per source row? > A: Choose SUM for total revenue, which returns 1,000. Choose AVERAGE for the average per source row, which returns 333.33. > ```