Getting a division by zero error, cannot resolve formula;
Have formula where attempting to divide by field with null value.
Field A / Field B (where B is null)
Use ISNOTHING to replace null with zero in Field B
Here is the formula:
=iif(isnothing(sum(fieldB)) = “True”, 0,iif(sum(fieldB = 0, 0, Sum(fieldA)/Sum(FieldB)))
I am expecting the result to be zero with the ISNOTHING = “True” holding value and making the result
zero. However, result is error from dividing by zero.
When I replace the Field references with values, the formula works. Tested by setting ISNOTHING to True and False.
Can someone explain the problem with the formula.
Thanks,
awaria
Have formula where attempting to divide by field with null value.
Field A / Field B (where B is null)
Use ISNOTHING to replace null with zero in Field B
Here is the formula:
=iif(isnothing(sum(fieldB)) = “True”, 0,iif(sum(fieldB = 0, 0, Sum(fieldA)/Sum(FieldB)))
I am expecting the result to be zero with the ISNOTHING = “True” holding value and making the result
zero. However, result is error from dividing by zero.
When I replace the Field references with values, the formula works. Tested by setting ISNOTHING to True and False.
Can someone explain the problem with the formula.
Thanks,
awaria