Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need 0 were blanks on report

Status
Not open for further replies.

bkel

Programmer
Apr 23, 2011
16
US
=IIf(Nz(Sum([2010]),0)=0,0,((Sum([ExpenseCrossTabForecastExpense.2011]))-Sum([2010]))/(Sum([2010])))

I am doing a calcualation ON the Report itself calcualting change year over year and adding this got rid of some of the blanks and put in 0s but some are still there?? when its (0-0)/0 or (.1-0)/
some of the (0-0)/0 are showing 0s though - I am confused???

thanks,
bkel
 
Just wanted to note it is formatted as Percent with one decimal place - don't know if that has something to do with it?
thanks,
bkel
 
one more thing i noticed -
if year 1 is say 10,000 and year2 is 0 the calc. is Year over year change
(0-10000)/10000 so the answer should be -1%? but getting blank

there are a few other situations where the answer should be -1% and getting a blank- that is the only place I have blanks if year 1 is 0 and year2 is 0 - i get 0 with the above formual??
 
sorry - a little more - actually with the percent formatting the answer should be -100% but again getting a blank??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top