Wednesday, September 29, 2021

Getpivotdata function

The GETPIVOTDATA function returns visible data from a PivotTable.

In this example, =GETPIVOTDATA("Sales",A3) returns the total sales amount from a PivotTable:

Example of using the GETPIVOTDATA function to return data from a PivotTable.

Syntax

GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], ...)

The GETPIVOTDATA function syntax has the following arguments:

Argument

Description

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]"

Notes: 

  • You can quickly enter a simple GETPIVOTDATA formula by typing = (the equal sign) in the cell you want to return the value to and then clicking the cell in the PivotTable that contains the data you want to return.

  • You can turn this feature off by selecting any cell within an existing PivotTable, then go to the PivotTable Analyze tab > PivotTable > Options > Uncheck the Generate GetPivotData option.

  • Calculated fields or items and custom calculations can be included in GETPIVOTDATA calculations.

  • If the pivot_table argument is a range that includes two or more PivotTables, data will be retrieved from whichever PivotTable was created most recently.

  • If the field and item arguments describe a single cell, then the value of that cell is returned regardless of whether it is a string, number, error, or blank cell.

  • If an item contains a date, the value must be expressed as a serial number or populated by using the DATE function so that the value will be retained if the worksheet is opened in a different locale. For example, an item referring to the date March 5, 1999 could be entered as 36224 or DATE(1999,3,5). Times can be entered as decimal values or by using the TIME function.

  • If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!.

  • If the arguments do not describe a visible field, or if they include a report filter in which the filtered data is not displayed, GETPIVOTDATA returns the #REF! error value.

Examples

The formulas in the example below show various methods for getting data from a PivotTable.

Example of a PivotTable used to retreive data from with the GETPIVOTDATA function.

Top of Page

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Excel functions (alphabetical)

Excel functions (by category)

4 comments:

  1. HELLO GET OUT OF FINANCIAL MESS WITH THE HELP OF drbenjaminfinance@gmail.com

    I have been in financial mess for the past months, I’m a single mum with kids to look after. My name is REBECCA MICHAELSON, and am from Ridley Park, Pennsylvania. A couple of weeks ago My friend visited me and along our discussion she told me about DR BENJAMIN OWEN FINANCE of (drbenjaminfinance@gmail.com); that he can help me out of my financial situation, I never believed cause I have spend so much money on different loan lenders who did nothing other than running away with my money. She advised, I gave it a try because she and some of her colleagues were rescued too by this Godsent lender with loans to revive their dying businesses and paying off bills. so I mailed him and explain all about my financial situation and therefore took me through the loan process which was very brief and easy. After that my loan application worth $278,000.00USD was granted, all i did was to follow the processing and be cooperative and today I am a proud business owner sharing the testimony of God-sent Lender. You can as well reach him through the Company WhatsApp +19292227023 Email drbenjaminfinance@gmail.com

    THANK YOU VERY MUCH

    ReplyDelete
    Replies
    1. What has your government done to help save you from your financial instability? you strive to survive and yet you hear stories of how your leaders have become terror in your entities... is time to make a different. for will have made money, and we have also come to help you out from your long time of financial suffering. clearing of credit card is made available, software for hacking ATM machines, bank to bank hacking and transfer, change your school grade and become something useful in the society. we also have other form of services such as Facebook hack, whats-app hack, twitter hack, i cloud hack, tracking of smart phones, hacking CCTV, installation of software on desktop and PC, snap-chat hack, Skype hack, wire wire, bitcoin account hack, erase your criminal record and be free for ever. database hack and many more. e-mail: cyberhackingcompany@gmail.com for your genuine hacking services and we shock we your findings.  

      Delete
  2. I invested $95,420 in Bitcoin trading from an unregulated broker, I feel agitated about my situation, even find my life in a difficult time to make withdrawal from my account, I Saw a post about An online fund charge back recovery company going through some page here on this platform, at *www thedailychargeback com* ,I gave them all the information they needed to place the recovery. To my surprise I successfully got my funds off that broker confirming the payment on my wallet account, I highly recommend their service to others.

    ReplyDelete
  3. After some financial struggles I had 4 charge offs and 4 collections. I have two cards still that are in good standing and each had two 30 days lates that are 3 years old. My credit score was TransUnion 585, Equifax 583 and Experian 528. I have been facing depression due to my poor credit score. Luckily for me a friend introduced me to PINNACLE CREDIT SPECIALIST who helped me raise my credit score to TransUnion 805, Equifax 809 and Experian 811. Also removed all charge offs, collection and eviction from my credit report. I now have a clean credit report with an Exceptional credit score. He’s the real deal. All thanks to PINNACLE CREDIT SPECIALIST. Hit him up by email: PINNACLECREDITSPECIALIST@GMAIL.COM / Call +1 (760) 203 6466. 

    ReplyDelete