GETPIVOTDATA function
Summary
Returns data stored in a PivotTable report
Syntax
GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], ...)
The GETPIVOTDATA function syntax has the following arguments:
data_field Required | The name of the PivotTable field that contains the data that you want to retrieve. This needs to be in quotes.
pivot_table Required | A reference to any cell, range of cells, or named range of cells in a PivotTable. This information is used to determine which PivotTable contains the data that you want to retrieve.
field1, item1, field2, item2... Optional | 1 to 126 pairs of field names and item names that describe the data that you want to retrieve. The pairs can be in any order. Field names and names for items other than dates and numbers need to be enclosed in quotation marks. For OLAP PivotTables, items can contain the source name of the dimension and also the source name of the item. A field and item pair for an OLAP PivotTable might look like this: "[Product]","[Product].[All Products].[Foods].[Baked Goods]"
data_field Required | The name of the PivotTable field that contains the data that you want to retrieve. This needs to be in quotes.
pivot_table Required | A reference to any cell, range of cells, or named range of cells in a PivotTable. This information is used to determine which PivotTable contains the data that you want to retrieve.
field1, item1, field2, item2... Optional | 1 to 126 pairs of field names and item names that describe the data that you want to retrieve. The pairs can be in any order. Field names and names for items other than dates and numbers need to be enclosed in quotation marks. For OLAP PivotTables, items can contain the source name of the dimension and also the source name of the item. A field and item pair for an OLAP PivotTable might look like this: "[Product]","[Product].[All Products].[Foods].[Baked Goods]"
Example
=GETPIVOTDATA("Sales",A3) returns the total sales amount from a PivotTable:
Syntax
GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], ...)
Syntax
GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], ...)