IF(ISERROR((GETPIVOTDATA) won't show any value once pivot table is updated with new information

jessitarexcel

Board Regular
Joined
Apr 6, 2022
Messages
60
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I had a look through the forums but could not find a solution to this issue.

I have a series of worksheets with data being entered and changed on a daily basis. That data is collated into a single sheet as a summary. Some of the information is not currently available in the data and therefore the pivot tables. I have this formula in the cells that contain reference data: =GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","House"). If I have data for the reference area with the residence type house, it obviously returns the number. In the other cells, I would like to refer to the other residence types that don't appear as yet.

Example Table below:

Reference Area - House=GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","House")2
Reference Area - Unit=GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Unit")#REF!
Reference Area - Boat=GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Boat")
#REF!
Reference Area - Caravan=GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Caravan")#REF!

As there are only houses in the data so far, I am getting a #REF! area in the cells for the other residence types.

I then tried adding in ISERROR((=GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Caravan")) - which returns a true or false value and that allows the cells to be added up properly with the true being counted as a 0.

To show the result as a 0 instead of true, I added in =IF(ISERROR((GETPIVOTDATA("Type of Residence",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Boat"))),0,0), the result shows up as 0, but if I actually enter in a caravan as a test into the data, the pivot table shows the caravan, but the formula won't pick it up.

Is there anyway to keep the formula in the cell without it showing true or false but it will still update once the data has been entered? Any assistance is sincerely appreciated.
 
You seem to have used:

=IFERROR((GETPIVOTDATA("Type of Residence",'SAG Pivot Tables - Locked'!$AB$3,"LGA","Reference Area","Type of Residence","Caravan")),"")

but Type of Residence is not a value field in that pivot table. I assume it should have been "LGA" as in the other formula.
Hello Rory, Type of Residence is a value field. The Pivot Table is displaying the LGA and Type of Residence. I am a little confused as to what you mean. All of the other formulas that return values show Type of Residence in the formula. The reason there are variances in the formula is that some of the information is not currently available. If I put in the normal GetPivotData formula that refers to data that is not yet available in the Pivot Table, then I get a #REF! value and the table won't total properly. I can make all REF's a 0 and then make the 0 disappear by changing an option in the settings, but I want the formulas there so that once the data is entered, it appears properly and I don't have to go back to change each formula manually at a later date.
 
Upvote 0

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.
In your xl2bb of your pivot table it has the "type of residence" in the position of a Row Label / Row Field. A value field sits in the Data Area of the pivot and will have something like Sum, Count, Max, Min etc applied to it.
Did you try copying my xl2bb into cell b78 of a blank sheet in your workbook?
 
Upvote 0
In your xl2bb of your pivot table it has the "type of residence" in the position of a Row Label / Row Field. A value field sits in the Data Area of the pivot and will have something like Sum, Count, Max, Min etc applied to it.
Did you try copying my xl2bb into cell b78 of a blank sheet in your workbook?
Thank you for your help and thank you also to Rory. I think I have resolved the issue and I understand what yourself and Rory were referring to. I will copy over the solution shortly. I haven't tried your suggestion as yet but I also think that is a good solution. I have also fixed up all of the formulas to be uniform. I feel so silly that it was such a simple fix and I just couldn't see it. It is such a monster of a spreadsheet with so many different formulas and I think my eyes were going square trying to figure it out. Sometimes the simplest solution works. Give me just a few minutes and I will put up my new table.
 
Upvote 0
Post Approval Tracker - BNE Data.xlsx
BC
80Summary InformationTotals
81BCC Boat10
82BCC Caravan2
83BCC House105
84BCC Unit/Townhouse11
85BCC Total Applications128
86RCC Boat0
87RCC Caravan1
88RCC House2
89RCC Unit/Townhouse0
90RCC Total Applications3
91MBRC Boat0
92MBRC Caravan0
93MBRC House1
94MBRC Unit/Townhouse0
95MBRC Total Applications1
SAG Overview
Cell Formulas
RangeFormula
C81C81=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","BCC","Type of Residence","Boat"),"0")
C82C82=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","BCC","Type of Residence","Caravan"),"0")
C83C83=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","BCC","Type of Residence","House"),"0")
C84C84=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","BCC","Type of Residence","Unit/Townhouse"),"0")
C85C85=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","BCC"),"0")
C86C86=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","RCC","Type of Residence","Boat"),"0")
C87C87=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","RCC","Type of Residence","Caravan"),"0")
C88C88=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","RCC","Type of Residence","House"),"0")
C89C89=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","RCC","Type of Residence","Unit/Townhouse"),"0")
C90C90=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","RCC"),"0")
C91C91=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","MBRC","Type of Residence","Boat"),"0")
C92C92=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","MBRC","Type of Residence","Caravan"),"0")
C93C93=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","MBRC","Type of Residence","House"),"0")
C94C94=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","MBRC","Type of Residence","Unit/Townhouse"),"0")
C95C95=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables - Locked'!$AB$3,"LGA","MBRC"),"0")
 
Upvote 0
I did a test and removed the caravan and the formulas worked exactly as they should. Thank you so much everyone! I sincerely appreciate all of your help.
 
Upvote 0
You're welcome. Glad we could help.

If you want to, try this in C81, it should work for all the data lines.
Excel Formula:
=IFERROR(GETPIVOTDATA("LGA",'SAG Pivot Tables -  Locked'!$AB$3,"LGA",LEFT(B81,FIND(" ",B81)-1),"Type of  Residence",RIGHT(B81,LEN(B81)-FIND(" ",B81))),"")
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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