#Num!

  • Thread starter Thread starter Dan M.
  • Start date Start date
D

Dan M.

The following shows the result of a calculation in a
Report. The Report pulls the data from a Query.

Reviewed Returned Rebutted Recinded Accuracy

37 2 0 0 94.59%
0 0 0 0 #Num!
63 0 0 0 100%

Control Source... =1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed]))

Format.......... Percent

When the Reviewed field =0 the calculation returns a value
of #Num!

The (0 Reviewed) field value is needed and cannot be
eliminated or ruled out in the Query.

Is there a way to make it display 0 instead of #Num!

I've run out of ideas...
Please Help. thanks, dm
 
You are dividing by zero...Use IIf() to test first.
=IIf(Sum([Reviewed])=0,0, 1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed])))
 
Yes!! Thanks, dm

-----Original Message-----
You are dividing by zero...Use IIf() to test first.
=IIf(Sum([Reviewed])=0,0, 1-((Sum([Returned])-(Sum ([Rebutted])
+Sum([Recinded])))/Sum([Reviewed])))

--
Duane Hookom
MS Access MVP


The following shows the result of a calculation in a
Report. The Report pulls the data from a Query.

Reviewed Returned Rebutted Recinded Accuracy

37 2 0 0 94.59%
0 0 0 0 #Num!
63 0 0 0 100%

Control Source... =1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed]))

Format.......... Percent

When the Reviewed field =0 the calculation returns a value
of #Num!

The (0 Reviewed) field value is needed and cannot be
eliminated or ruled out in the Query.

Is there a way to make it display 0 instead of #Num!

I've run out of ideas...
Please Help. thanks, dm


.
 
Back
Top