+ Reply to Thread
Results 1 to 6 of 6

Columns Outside Pivot Table But Linked to PT

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    los angels, ca
    MS-Off Ver
    Excel 2007
    Posts
    27

    Columns Outside Pivot Table But Linked to PT

    Columns Outside Pivot Table But Linked to PT
    I have created a pivot table from (OLAP); however, there are additional calculations that I must do outside the query inside Excel using adjacent columns; hence, I use GETPIVOTDATA to retrieve information from inside the pivot table and then work my formula magic.

    My challenge: When I refresh the table data using a different month, the total rows in the pivot table will change depending on newly inserted data or deleted data within the pivot table, which causes my totals outside the pivot table not to align properly now.

    How can I make sure columns outside the pivot table remain aligned with the columns of those inside the pivot table so my formula reference will correspond to the pivot table?

    Thanks much

  2. #2
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Columns Outside Pivot Table But Linked to PT

    Insert calculated field can be used to give u error free formula

  3. #3
    Registered User
    Join Date
    12-04-2012
    Location
    los angels, ca
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Columns Outside Pivot Table But Linked to PT

    VKS,

    Not sure what you meant by your answer (Please clarify). To elaborate as an eg. At time (0), the Pivot Table (PT) has 200 rows and my added excel columns have formulas referncing the specific 200 rows. If next month the PT expands to 205 rows (including deletions and additions), my added excel column referencing the 200 rows from last month will be off. I am trying to find a way that I can match up my outside PT formula column to match the PT as it changes dynamically each month.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Columns Outside Pivot Table But Linked to PT

    when i have done something like that, i have just used a regular formula, not getpivotdata. just a simple reference to the column/row inside the PT, copied down way past where you think you will need it (crude but effective). to eliminate errors in cells where the PT does noit go down that far, use =if(cell="","", etc...........
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    12-04-2012
    Location
    los angels, ca
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Columns Outside Pivot Table But Linked to PT

    Thanks FDibbins- I used your method vs Getpivot data and it worked even though my thoughts were along the lines of updating portions of the getpivotdata cell separately based on portions of its formula in each cell.
    Two follow up questions:
    1)As the range changes depending on PT results, do I use a dynamic named range on the outside PT calculation range or will the dynamic named range refer to the PT itself as it contracts and expands each month?
    2) How can I copy filtered data to another sheet not as copy\past\value because I need the values to be formula driven as its source may change as my filtered data may be updated

    Thanks in advance for your help

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Columns Outside Pivot Table But Linked to PT

    the formula should sort itself out as the PT grows/shrinks (if you have set it up that way lol)
    regarding the copy/paste, it might be better to set up another tabl;e there and reference the data that you want?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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