+ Reply to Thread
Results 1 to 4 of 4

In this formula is there a way to substitute the pivot table reference with formula?

  1. #1
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2013
    Posts
    200

    In this formula is there a way to substitute the pivot table reference with formula?

    I have the following pull from a PowerPivot Pivot Table:

    Please Login or Register  to view this content.
    Is it possible to substitute the "'Top 10 Pivots'!$X$4" with some type of a reference in a cell? So instead of "'Top 10 Pivots'!$X$4" I'd want it to be something like $A5 which would contain the value 'Top 10 Pivots'!$X$4? Have to duplicate some Top 10 tables across business segments and would make it easier to just reference a cell.

    Thanks.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: In this formula is there a way to substitute the pivot table reference with formula?

    Better if you provided a sample sheet, but try:

    =IF(ISBLANK($A11),"",GETPIVOTDATA("[Measures].["&G$66&"]",INDIRECT($A5),"[MonthOnlyDateTable].[Year]","[MonthOnlyDateTable].[Year].&["&PriorYear&"]","[MonthOnlyDateTable].[Fiscal Month]","[MonthOnlyDateTable].[Fiscal Month].&["&PYFiscalMonth&"]","[MasterData].[Product Group]","[MasterData].[Product Group].&["&$A11&"]"))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2013
    Posts
    200

    Re: In this formula is there a way to substitute the pivot table reference with formula?

    That did it - Definitely need to learn the INDIRECT function better. Thanks and Repped!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: In this formula is there a way to substitute the pivot table reference with formula?

    You're welcome..

    Advantages: very handy for things like that.

    Disadvantages: volatile (recalculates everytime something changes... can make for poor performance) and (if referencing another workbook...) both workbooks MUST be open.

+ 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] Need help with simple REPLACE / SUBSTITUTE formula for 2 pivot tables
    By Megs35 in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 10-24-2017, 12:24 AM
  2. Pivot table reference formula
    By jPrisk in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-09-2016, 03:25 PM
  3. Substitute column headings in a pivot table macro
    By cymraeg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 09:44 AM
  4. Reference the number of changing data in a formula from pivot table
    By jonathan.haynes in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-23-2013, 07:57 AM
  5. using an index formula to reference a pivot table
    By coffee_man in forum Excel General
    Replies: 0
    Last Post: 02-20-2012, 05:17 PM

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