division by zero

G

Guest

I get the DIVISION BY ZERO error when running this query. The only thing
that changed was this query design:

OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Any of the SUM OF can have a value of 0.

Please help


Here is how my indiviual
 
D

Duane Hookom

Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])
 
G

Guest

So is this correct:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/IIF([Sum Of SumOfTrue (-)0,0+
IIF[Sum Of SumOfFalse (+)]0,0))*100)

So that for every expression [Sum of Sum???], I must use the IIF statement
in front of it OR will just this work:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Thanks for your help,





Duane Hookom said:
Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])

--
Duane Hookom
MS Access MVP

Kate said:
I get the DIVISION BY ZERO error when running this query. The only thing
that changed was this query design:

OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum
Of
SumOfFalse (+)]))*100)

Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Any of the SUM OF can have a value of 0.

Please help


Here is how my indiviual
 
D

Duane Hookom

I don't see any "=0" in your expression like I had in mine. Also IIf is
always followed by a "(" like in my expression.

--
Duane Hookom
MS Access MVP

K said:
So is this correct:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/IIF([Sum Of SumOfTrue
(-)0,0+
IIF[Sum Of SumOfFalse (+)]0,0))*100)

So that for every expression [Sum of Sum???], I must use the IIF statement
in front of it OR will just this work:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/([Sum Of SumOfTrue (-)]+[Sum
Of
SumOfFalse (+)]))*100)

Thanks for your help,





Duane Hookom said:
Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])

--
Duane Hookom
MS Access MVP

Kate said:
I get the DIVISION BY ZERO error when running this query. The only
thing
that changed was this query design:

OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue
(-)]+[Sum
Of
SumOfFalse (+)]))*100)

Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Any of the SUM OF can have a value of 0.

Please help


Here is how my indiviual
 
G

Guest

Sorry:

Specificity %: IIF((([Sum Of SumOfTrue (-)]=0,0/([Sum Of SumOfTrue (-)]+[Sum
Of SumOfFalse (+)])))*100)

Thanks,
K


Duane Hookom said:
I don't see any "=0" in your expression like I had in mine. Also IIf is
always followed by a "(" like in my expression.

--
Duane Hookom
MS Access MVP

K said:
So is this correct:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/IIF([Sum Of SumOfTrue
(-)0,0+
IIF[Sum Of SumOfFalse (+)]0,0))*100)

So that for every expression [Sum of Sum???], I must use the IIF statement
in front of it OR will just this work:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/([Sum Of SumOfTrue (-)]+[Sum
Of
SumOfFalse (+)]))*100)

Thanks for your help,





Duane Hookom said:
Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])

--
Duane Hookom
MS Access MVP

I get the DIVISION BY ZERO error when running this query. The only
thing
that changed was this query design:

OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue
(-)]+[Sum
Of
SumOfFalse (+)]))*100)

Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)

Any of the SUM OF can have a value of 0.

Please help


Here is how my indiviual
 
D

Duane Hookom

I had
IIf(...=0, 0 , ....)
you have
IIf(...=0, 0/... , ....)

I'm not sure what expressions you are dividing by what. I expect you need
something like:

Specificity %: IIf( [Sum Of SumOfTrue (-)]=0, 0, ([Sum Of
SumOfTrue (-)]+[Sum Of SumOfFalse (+)] ) *100/ [Sum Of SumOfTrue (-)] )

Your use of parens and symbols in field/column names makes your expression
difficult to understand.

--
Duane Hookom
MS Access MVP



Kate said:
Sorry:

Specificity %: IIF((([Sum Of SumOfTrue (-)]=0,0/([Sum Of SumOfTrue
(-)]+[Sum
Of SumOfFalse (+)])))*100)

Thanks,
K


Duane Hookom said:
I don't see any "=0" in your expression like I had in mine. Also IIf is
always followed by a "(" like in my expression.

--
Duane Hookom
MS Access MVP

K said:
So is this correct:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/IIF([Sum Of SumOfTrue
(-)0,0+
IIF[Sum Of SumOfFalse (+)]0,0))*100)

So that for every expression [Sum of Sum???], I must use the IIF
statement
in front of it OR will just this work:

Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/([Sum Of SumOfTrue
(-)]+[Sum
Of
SumOfFalse (+)]))*100)

Thanks for your help,





:

Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])

--
Duane Hookom
MS Access MVP

I get the DIVISION BY ZERO error when running this query. The only
thing
that changed was this query design:

OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue
(-)]+[Sum
Of
SumOfFalse (+)]))*100)

Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum
Of
SumOfFalse (+)]))*100)

Any of the SUM OF can have a value of 0.

Please help


Here is how my indiviual
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top