Divide By Zero

  • Thread starter Thread starter Paul W Smith
  • Start date Start date
P

Paul W Smith

I am trying to set a calculated field which works out an average. My
problem is that sometimes the denominator is zero causing an issue. If this
is the case I would like to return a null or blank.

SumA/SumB = Average

How do I wrap my calculating code so I get my desired results?

Paul Smith
 
Paul said:
I am trying to set a calculated field which works out an average. My
problem is that sometimes the denominator is zero causing an issue.
If this is the case I would like to return a null or blank.

SumA/SumB = Average

How do I wrap my calculating code so I get my desired results?
Use "immediate if" - iif()

Average = iif(SumB>0,SumA/SumB, 999999999 )
 
Back
Top