GETPIVOTDATA function - Zoho Sheet - Help Guide

GETPIVOTDATA

Extracts specific values from the pivot table.

Syntax

GETPIVOTDATA(data_field; pivot_table; [field_1; item_1; field_2; item_2];...)

data_field: The name of the value field in the pivot table that contains the data you wish to extract. This should be entered as text strings in double quotation marks or as a cell reference.

pivot_table: A reference to the cell or range of cells in the pivot table.

[field_1] (optional): Name of the row, column, or filter field in the pivot table. E.g. "Product"

[item_1] (optional): Specific item within that field that you wish to match. E.g. "Desk"

Remarks

  1. The GETPIVOTDATA() function is automatically generated when you manually reference a cell within the pivot table from a formula outside of the pivot table starting with the "=" sign. GETPIVOTDATA() can be used with other formulas such as SUM, AVERAGE,  or IF. E.g. =SUM(GETPIVOTDATA("Total sales"; A3; "Region"; "East"); GETPIVOTDATA("Total sales"; A3; "Region"; "West"))
  2. Field names and item names must match exactly like how they appear in the pivot table, including capitalization and spaces.
  3. Date should be specified in the format "01/10/2025" instead of manually entering it as text strings.

Get a hands-on experience of the function in the embedded range below



Examples

Formula
Result

=GETPIVOTDATA("Sales";$F$1)

$4349

=GETPIVOTDATA("Sales";$F$1;"Sales Rep";"Mark";"Date";"1/10/2025";"Item";"Pencil")

​​​​$58


Possible Errors

Errors
Meaning
#NAME!

  1. The function name is incorrect or invalid.
  2. The given defined name (if any) is invalid.
  3. There is a typo in the defined name used in the function.
  4. Double quotes are missing for the text values in the function.
  5. Colon missing in the cell range reference.
#VALUE!
  1. The given argument's data type is incorrect or invalid. For example, the function DATE(A1:A3) will return a #VALUE! error when a text value is present in a range.
#REF!
  1. The field name or item name is incorrect.
  2. If an item is not found in the pivot table.
  3. A row is filtered out, and the field or item name is entered as a text string instead of a cell reference.
  4. If the subtotals or grand totals are turned off in the pivot table.