GETPIVOTDATA Function in Google Sheets: Formula, Examples & Troubleshooting
Retrieve named pivot-table totals with GETPIVOTDATA in Google Sheets. Build field/item pairs, use a stable anchor, and diagnose missing or renamed values.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: GETPIVOTDATA retrieves an aggregate already present in a pivot table by its value heading and optional field/item pairs. It is useful when the desired business category matters more than the cell where a pivot currently displays it.
Verification: NOT_TESTED_IN_GOOGLE_SHEETS. First-party Google documentation was reviewed October 17, 2026. The example aggregates were independently calculated from the supplied rows; no pivot table was executed or captured here.
Syntax and argument pairing
Google displays the signature as:
=GETPIVOTDATA(value_name, any_pivot_table_cell, [original_column, ...], [pivot_item, ...])
In an actual formula, additional filters are alternating field/item pairs, as in Google’s own multi-pair example. For two conditions, the practical arrangement is value_name, anchor, field1, item1, field2, item2.
value_nameidentifies the pivot’s value field. Supply quoted text or a cell containing it; use the exact displayed name when there are multiple value fields.any_pivot_table_cellis a reference inside the intended pivot. Google recommends its top corner.- Each optional
original_columnidentifies a source field, followed by the correspondingpivot_itemvisible in the pivot.
A requested value must appear in the pivot itself. GETPIVOTDATA does not create a missing aggregate from the raw dataset. Google GETPIVOTDATA reference.
Example: retrieve East-region online sales
Create a sheet named Source and enter A1:C7:
| Region | Channel | Amount |
|---|---|---|
| East | Online | 100 |
| East | Online | 150 |
| East | Retail | 80 |
| West | Online | 90 |
| West | Retail | 110 |
| West | Retail | 70 |
- Select Source!A1:C7 and choose Insert → Pivot table on a computer.
- Place the pivot on a sheet named
Pivot, starting at A1. - Add Region as rows, Channel as columns, and Amount as values summarized by SUM.
- Keep all source records included. Enable the appropriate row/column totals for the total examples below.
- Inspect the displayed value heading. The formulas below use
SUM of Amount; if your heading differs, substitute the exact displayed text.
On a separate report sheet, enter:
=GETPIVOTDATA("SUM of Amount",Pivot!$A$1,"Region","East","Channel","Online")
The expected result is 250, independently checked as 100 + 150. The corresponding West/Retail aggregate is 180, from 110 + 70.
For reference, the independently calculated summary is:
| Region | Online | Retail | Total |
|---|---|---|---|
| East | 250 | 80 | 330 |
| West | 90 | 180 | 270 |
| Total | 340 | 260 | 600 |
These numbers describe the intended pivot configuration, not a screenshot of a generated pivot. Google’s pivot setup and customization references cover creating fields and showing totals.
Drive the requested item from report cells
Put East in A2 and Online in B2 on your report. Use:
=GETPIVOTDATA("SUM of Amount",Pivot!$A$1,"Region",A2,"Channel",B2)
Changing those selector cells to West and Retail requests the 180 aggregate without rewriting the formula. Keep the field-name text fixed and make only the requested items variable. This is easier to review than relying on a coordinate such as Pivot!C4 whose business meaning may change when the pivot’s layout changes.
Do not promise immunity to every pivot edit. Removing a field, hiding a required value, renaming a heading, or moving the anchor outside the pivot can still invalidate the request.
Advanced use: reconcile visible totals
With the grand total visible, this formula requests it:
=GETPIVOTDATA("SUM of Amount",Pivot!$A$1)
Its expected result is 600 for the unfiltered example. Compare it with =SUM(Source!C2:C7), also 600. A difference is a prompt to inspect the pivot’s source range, filters, and aggregation choice; it is not automatically a GETPIVOTDATA calculation error.
With the East total visible, =GETPIVOTDATA("SUM of Amount",Pivot!$A$1,"Region","East") is expected to return 330. Its share of the unfiltered total is 330/600 = 55%.
Only compare totals with the same scope. A pivot filtered to East legitimately summarizes fewer rows than a SUM over the complete source. Google’s customization reference also warns that value-based pivot filters may need updating to show new source values.
Troubleshooting
- The anchor no longer belongs to the pivot: Prefer its top corner. A cell near the bottom can fall outside the pivot when the result shrinks.
- A heading was renamed: Google requires the custom heading when one is used. Inspect the actual pivot labels rather than guessing from the original source header.
- A field name differs only in case: Field-name case is an exception to Google’s otherwise case-insensitive text-argument rule. Preserve field names exactly.
- The requested subtotal is unavailable: Confirm it is displayed in the pivot and that totals or relevant items have not been excluded.
- There are several value fields: Use the exact value heading, including its aggregation label where applicable.
- A formula has all fields followed by all items: Pair each field with its item in sequence.
The reference describes errors for invalid pivot situations but does not establish every exact error token. Avoid replacing failures with zero before deciding whether zero is a genuine business value.
Availability and related guides
Google currently documents GETPIVOTDATA; its initial introduction and retirement or last-working version were not established. Google directs pivot creation/use to a computer. This guide does not assume Excel’s automatic formula-generation behavior or other-engine pivot semantics.
See SUM for reconciliation, SUMIFS for a separate criteria-based aggregate, and IFERROR for deliberate error presentation after diagnosis.
First-party references reviewed October 17, 2026: GETPIVOTDATA, create pivot tables, and customize pivot tables.