+ Reply to Thread
Results 1 to 4 of 4

Unable to get data from Pivot Table via GETPIVOTDATA

  1. #1
    Registered User
    Join Date
    10-06-2020
    Location
    Brisbane,Australia
    MS-Off Ver
    Office 365
    Posts
    4

    Angry Unable to get data from Pivot Table via GETPIVOTDATA

    SampleGetPivotDataV2.png

    I am a new user so hope this message contains enough info.

    The above Pivot Table is generated from data imported into a model via and ODBC.Query.

    I have tried numerous variations of the GETPIVOTDATA formula, both via Excel as well as VBA and all I get is the dreaded #REF!

    Variations included:
    * using table name vs range
    * using Item values vs values from a cell
    * using name of the data field as "Sum of MovementMTD" vs "MovementMTD"
    * changing pivot table Row Labels and Column Labels to name of the data fields

    The following are some of the variations I have tried:
    =GETPIVOTDATA("Sum of MovementMTD","PivotTable1","GLAccountCode","555.5057.5","PeriodNo","2")
    =GETPIVOTDATA("Sum of MovementMTD",$B$3:$O$21,"GLAccountCode","555.5057.5","PeriodNo","2")
    =GETPIVOTDATA("Sum of MovementMTD",$B$3,"GLAccountCode",$Q$13,"PeriodNo",$Q$16)

    What we are trying to achieve is to update other sheets in the workbook by extracting the values from this imported pivot table based on known GLAccountCode and PeriodNo.

    Really would appreciate assistance with this and suggestions on what else I am able to try.

    Thanks

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,561

    Re: Unable to get data from Pivot Table via GETPIVOTDATA

    It may be easier for someone to help if you upload the spreadsheet from which the screenshot in post #1 is taken (instructions are given in the banner at the top of the page).
    Please include the value you expect the GETPIVOTDATA function to yield based on the numbers currently in the pivot table.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    10-06-2020
    Location
    Brisbane,Australia
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Unable to get data from Pivot Table via GETPIVOTDATA

    Using the GETPIVOTDATA formula to extract a value from a Pivot Table that is based on a data model is WAY different to a normal Pivot table.

    The following are equivalent formula for a data model pivot table:

    =GETPIVOTDATA("Sum of MovementMTD",$B$3:$O$21,"GLAccountCode","555.5057.5","PeriodNo","2")
    Should be:
    =GETPIVOTDATA("[Measures].[Sum of MovementMTD]",$B$3,"[GLBalances].[GLAccountCode]","[GLBalances].[GLAccountCode].&[555.5057.5]","[GLBalances].
    [PeriodNo]","[GLBalances].[PeriodNo].&[2]")

    =GETPIVOTDATA("Sum of MovementMTD",$B$3,"GLAccountCode",$Q$13,"PeriodNo",$Q$16)
    Should be:
    =GETPIVOTDATA("[Measures].[Sum of MovementMTD]",$B$3,"[GLBalances].[GLAccountCode]","[GLBalances].[GLAccountCode].&[" & $Q$13 & "]","[GLBalances].
    [PeriodNo]","[GLBalances].[PeriodNo].&[" & $Q$16 & "]")

    Hope the above is helpful as I really spent a lot of frustration trying to get this to work.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,561

    Re: Unable to get data from Pivot Table via GETPIVOTDATA

    Glad that you were able to come up with a solution. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to GetPivotData from Data Model Pivot Table
    By tb426 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2019, 12:43 PM
  2. GETPIVOTDATA from Data model Pivot Table
    By triads in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-29-2019, 11:40 AM
  3. [SOLVED] GETPIVOTDATA or Formula to get the Data from Pivot Table
    By toci in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2016, 10:04 PM
  4. Extract data from Pivot Table (If statement & GetPivotdata)
    By rose9812in in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2015, 06:03 AM
  5. Extract data from Pivot Table (If statement & GetPivotdata)
    By rose9812in in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-14-2015, 10:51 AM
  6. I need to get data from Pivot Table via getpivotdata formula
    By joeycrak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2013, 05:14 PM
  7. Extracting data from pivot table using getPivotData function
    By shantanuk in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-24-2012, 08:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1