That is usually an indication that someone messed up on the parentheses or other
syntax.
I think this may be correct.
IIF([Sum Of SumOfTrue (-)] + [Sum Of SumOfFalse (+)] = 0, Null,
([Sum Of SumOfTrue (-)]/
([Sum Of SumOfTrue (-)]+[Sum Of SumOfFalse (+)])) * 100 )
The best way to trouble shoot is to build this a bit at a time and see what
happens at each stage.
IIF([Sum Of SumOfTrue (-)] + [Sum Of SumOfFalse (+)] = 0, Null, "Calculate")
If that works then try adding in the formula a bit at a time. Perhaps the next
step would be
IIF([Sum Of SumOfTrue (-)] + [Sum Of SumOfFalse (+)] = 0, Null,
[Sum Of SumOfTrue (-)]+[Sum Of SumOfFalse (+)])
Tedious, but it will usually get you there.
John and Linda's formulas both return a prompt that formula may be too
complicated (TELL ME ABOUT IT) and Cohen's formula still says divison by zero.
The field that has a 0 value is Sum of Sum of True (-)
John Spencer said:
You cannot ever divide by zero, so you need to test for that first with an
IIF statement. Something like the following
Specificity %: IIF([Sum Of SumOfTrue (-)] + [Sum Of SumOfFalse (+)] = 0,
Null,
(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of SumOfFalse
(+)]))*100))
K said:
Here is my formula:
Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)
I get the division by zero error when running my query. How do I change
my
formula to accept a zero value?????
Thanks