Sachin Bafna
New Member
Hi,
I am trying of get sum of values from a pivot table using getpivotdata function. The requirement is to get the sum based on certain values. My financial year is Jan to Aug. The formula used is
=SUM(GETPIVOTDATA("Value",$A$3,"Sub Region","Australia","Date",{1,2,3,4,5,6,7,8},"Years",2016),GETPIVOTDATA("Value",$A$3,"Sub Region","Australia","Years",{2014, 2015}))
In the above formula 1 to 8 are the months Jan to Aug. This function works fine when all the months are available in the pivot table.
But the moment I change the filter to another group, the underlying data changes as there might not be all the months from Jan to Aug in that group. This results in the formula to error as #REF.
Please help such that it ignores the data points (months in this case) which are not present and provides the sum for the available months.
I have attached a sample file for ease of understanding and correcting the formula.
Thanks,
Sachin
I am trying of get sum of values from a pivot table using getpivotdata function. The requirement is to get the sum based on certain values. My financial year is Jan to Aug. The formula used is
=SUM(GETPIVOTDATA("Value",$A$3,"Sub Region","Australia","Date",{1,2,3,4,5,6,7,8},"Years",2016),GETPIVOTDATA("Value",$A$3,"Sub Region","Australia","Years",{2014, 2015}))
In the above formula 1 to 8 are the months Jan to Aug. This function works fine when all the months are available in the pivot table.
But the moment I change the filter to another group, the underlying data changes as there might not be all the months from Jan to Aug in that group. This results in the formula to error as #REF.
Please help such that it ignores the data points (months in this case) which are not present and provides the sum for the available months.
I have attached a sample file for ease of understanding and correcting the formula.
Thanks,
Sachin
Attachments
Last edited: