GETPIVOTDATA with two slicers

lite4d

Board Regular
Joined
Jan 25, 2010
Messages
61
I have a pivot table that I want to draw data from but I have two different slicers(PLANT, MONTH) that filter the data. Here is my formula:

=GETPIVOTDATA("INV DOC", Calcs!$P$5, "Month", Calcs!Q6, "PLANT", Calcs!Q5)

I keep getting the #REF error and I made sure that all the cells are correct and tried to run it without the slicers in it but still get the error. I have changed the name of the field that I want to draw from and that didn't work.

Any idea as to what I have done wrong? I guarantee that it's something simple.

Thanks as always!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You will need to show us the pivot table headings at the very least.
It would also be worth going into a cell, putting in an "=" then pointing to a value you want to return and then show us the formula it generated.

Note: if the slicer filters the pivot in such a way that the formula is going to return nothing then you will get #REF
 
Upvote 0
Here a shots of the pivot table and the cell that i want the data to go along with the slicers that are in place to filter the data.
pic1.png
pic 2.png
 
Upvote 0
It sounds like this issue could be related to the way Excel searches for field names in your pivot table. Double-check field names ("Month," "PLANT," and "INV DOC") as they appear in the pivot table and exactly the character statement, including any leading/trailing spaces Sometimes these small differences can for #REF error .

When fixing threads like this, I’ve found it helpful to use a tool like SkySuite AI, which can highlight potential issues and suggest fixes as soon as possible. It’s been a time saver for me with complex formulas like GETPIVOTDATA.
 
Upvote 0
I ended up building more measures and filtering the data in the pivots that way and changing the way the pivots displayed the data. I then just referenced the grand totals of the columns that the measures created. The allowed me to get the totals when more than one plant was chosen or just a single plant. Thanks for the replies!
 
Upvote 0
Solution

Forum statistics

Threads
1,225,267
Messages
6,183,937
Members
453,197
Latest member
Choppa1

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