spreadsheet
New Member
- Joined
- Apr 14, 2011
- Messages
- 2
Hi,
I have a pivot table scenario where the column and row categories dissappear when filtering by month for example. I understand that part.
However, I am trying to use the 'getpivotdata' command to populate a report using specific cells. This works fine until one of these fields doesn't exist for one month (though it does exist elsewhere in the data table).
Is there a way to alter the getpivotdata formula to return zero instead of an error when an item does not exist at a filtered level.
My long solution was to put the GETPIVOTDATA formula off to the side in another cell, than put an ISERROR formula in the next cell, than put an IF formula in the report cell stating if the ISERROR is TRUE, enter 0, else ref the GETPIVOTDATA cell.
A B C D
1 Sales IF(c1=TRUE,0,=d1) ISERROR(d1) GETPIVOTDATA
There has to be an easier way.
I have a pivot table scenario where the column and row categories dissappear when filtering by month for example. I understand that part.
However, I am trying to use the 'getpivotdata' command to populate a report using specific cells. This works fine until one of these fields doesn't exist for one month (though it does exist elsewhere in the data table).
Is there a way to alter the getpivotdata formula to return zero instead of an error when an item does not exist at a filtered level.
My long solution was to put the GETPIVOTDATA formula off to the side in another cell, than put an ISERROR formula in the next cell, than put an IF formula in the report cell stating if the ISERROR is TRUE, enter 0, else ref the GETPIVOTDATA cell.
A B C D
1 Sales IF(c1=TRUE,0,=d1) ISERROR(d1) GETPIVOTDATA
There has to be an easier way.