Help with GetPivotData

Gjg1234

New Member
Joined
Nov 21, 2018
Messages
7
Hi,

I cannot seem to get all parts of my formula to calculate.

I have created the formula for 243 rows, but even though the formula is supposed to calculate correctly for all rows, it seems to work for some rows but not for the rest where it is supposed to calculate.

My formula is as follows:

Works for this:

=GETPIVOTDATA("Count of Product Code",Pivot_Analysis!$A$3,"Total No of Orders",B2,"Total no Qty Ordered",C2,"Total No of Days",D2,"Total No of Order Lines",E2,"Total No of times picked from a Pallet Location",F2)

But not this (even though it is supposed to):

=GETPIVOTDATA("Count of Product Code",Pivot_Analysis!$A$3,"Total No of Orders",B2,"Total no Qty Ordered",C2,"Total No of Days",D2,"Total No of Order Lines",E2,"Total No of times picked from a Pallet Location",F2)

Formula Sheet:

9

fulxqa.jpg
[/IMG]

Reference Pivot Table:

fozvw1.jpg
[/IMG]


Any ideas on how to fix this?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Those formulas look exactly the same to me. What's different?

You will get a #REF error if there isn't a cell in the pivot table for the conditions you specify - e.g. your row 3.
 
Last edited:
Upvote 0
Your row 3 is looking for a combination that doesn't appear in your pivot table, hence the error. There is no Low entry for "No of times picked from a Pallet Location" within the High entry for "No of Order Lines" in your pivot table.
 
Upvote 0
Thanks for clarifying.

However, for this one:

1qiw4i.jpg
[/IMG]

in row 123, despite the value supposedly being 6277, it does not seem to register. Any ideas as to why?
 
Upvote 0
Perhaps one, or more, of the "Low" values is actually "Low " or " Low" with additional spaces? Type = and select that cell and see what the hardcoded GETPIVOTDATA formula is.
 
Upvote 0
That does't seem to be the case, I checked. Is there any other error that could be related to this? I read that the getpivotdata formula can be pretty buggy
 
Upvote 0
Only if you are using custom subtotals, in which case I think all the formulas would error. What was the GETPIVOTDATA formula that Excel produced for you?
 
Upvote 0
I mean if you type an = sign and then select the cell in the pivot table from which the value should be returned, Excel should create a GETPIVOTDATA formula for you (unless you turned that option off in settings). What is that formula?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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