+ Reply to Thread
Results 1 to 2 of 2

Two Questions involving GetPivotData

  1. #1
    Registered User
    Join Date
    07-03-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    1

    Two Questions involving GetPivotData

    Hi,

    There's two things that I've been trying to accomplish with pivot table data.

    I am extracting information from a pivot table that has columns with these headings:

    2015-02-01 | 2015-03-01 | 2015-04-01 | etc.

    I will note here that the day of the month is not important to what I'm doing. But I am putting the dates here exactly as they appear in the data.

    I have a GetPivotData function that looks like this: =GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","0"). This function works. However, I need to use this formula for multiple dates and multiple values for Category2, and then add them together. I'm having trouble figuring out how to achieve this with the formulas.


    The first thing: The date in the data field. Rather than have the date just hard inserted into the formula, I would like to point the data field to cell that contains a date AND have it subtract a number of months from that date.

    For example, let's say that Cell A1 contains 2015-07-01. I would like to enter something that works like GETPIVOTDATA("month(A1)-2",Transactions!$A$1,"Category1",A7,"Category2","0") so that the actually date being referenced is 2015-05-01.

    Is this possible?


    The second thing: In the example above, I have a 0 as the item for "Category2." I need to add the results of the same formula with that item for 0-6, the result being equivalent to:

    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","0")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","1")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","2")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","3")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","4")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","5")+
    GETPIVOTDATA("2015-05-01",Transactions!$A$1,"Category1",A7,"Category2","6")

    Is there a way to program it to automatically run this formula from 0 to 6?


    Thank you in advance for any assistance that you can provide!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Two Questions involving GetPivotData

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. [SOLVED] GETPIVOTDATA – How to force getpivotdata to accept missing data
    By scottc_00 in forum Excel Formulas & Functions
    Replies: 39
    Last Post: 02-11-2015, 03:23 PM
  2. [SOLVED] SUMIF involving AND
    By bridge4444 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2014, 07:26 AM
  3. [SOLVED] Something involving modulus 10
    By paliali21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 06:04 AM
  4. questions that aren't really excel questions
    By martindwilson in forum The Water Cooler
    Replies: 1
    Last Post: 03-11-2012, 08:21 PM
  5. Help with function involving if then else?
    By jbobzien in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2006, 04:12 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