Dynamic Object Pivot Table Reference

Darkcloud617

New Member
Joined
Sep 7, 2017
Messages
38
Hello,

I am using a pivot table that is an object so a certain area can be grouped. When I reference a cell in the pivot table it returns this:

Excel Formula:
=GETPIVOTDATA("[Measures].[Distinct Count of Number]",$AY$119,"[Range].[Audit Period (Month)]","[Range].[Audit Period (Month)].&"[BK119]","[Range].[Loan Type]","[Range].[Type].&[Default]")

The issue is that I need this formula to by dynamic by the "Audit Period" month. I tried to add a cell reference (which contains the month) and that is at cell "[BK119]". In cell "[BK119]" it says "Jan".

Any ideas on adding a dynamic reference to a pivot table formula like this? It would be greatly appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
You just concatenate it in:

Excel Formula:
=GETPIVOTDATA("[Measures].[Distinct Count of Number]",$AY$119,"[Range].[Audit Period (Month)]","[Range].[Audit Period (Month)].&["&BK119&"]","[Range].[Loan Type]","[Range].[Type].&[Default]")
 
Upvote 0
Thank you for the reply. I seem to be getting a #REF error with that. Is there any other way to concatenate that? In the original the month is reference as "Jan" so I have my cell formatted to do that same.
 
Upvote 0
so I have my cell formatted to do that same
The cell needs to actually contain just the text Jan. If it has a date in it, you'll need to account for that using TEXT:

Excel Formula:
=GETPIVOTDATA("[Measures].[Distinct Count of Number]",$AY$119,"[Range].[Audit Period (Month)]","[Range].[Audit Period (Month)].&["&TEXT(BK119,"mmm")&"]","[Range].[Loan Type]","[Range].[Type].&[Default]")
 
Upvote 0
Glad we could help. :)
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,165
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top