# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Total for Calculated Field not adding up

## jp16

System generated ageing report if a invoice is 0-30 days, it pull the invoice amount in the respective column and a 0 in other column. I need to see each supplier has how many invoice is overdue 30 days, 60 days etc. 
HOwever, due to the 0, Pivot table would include it when i subtotal using Count. Hence i insert calculated field. which is =if(' 30 Days"=0,0,1). However, when i use the sum subtotal for the Calculated field, it keep showing 1 despite having more than one's 1 above. Why is this so?

----------


## rorya

Your calculated field calculates as:

=if(SUM(' 30 Days")=0,0,1)

For the grand total, it will not change and sum up the 1s and 0s above it, it will apply the same formula, so your result will only ever be 1 or 0. You;d need Power Pivot to do something different for the grand total line.

----------

