Divide by Zero

  • Thread starter Thread starter Markus
  • Start date Start date
M

Markus

I need to get percentages in a table but some of the
values in the table are zero. Is there anything I can add
to my table to NA and records with 0? I still need the
percentages for the records with values.
Here is my formula
Perc: Sum(RBQYes3and4!Address/RBQSCR3and4!Address)
There are values in RBQSCR that are Zero but I still need
the results of the other values. Any help is appreciated.
 
Hi Markus,

Try using:

Perc: iif(Sum(RBQSCR3and4!Address)>0,Sum(RBQYes3and4!
Address/RBQSCR3and4!Address),"N/A")

It's possible that will still give you problems with null
values. If so, you may need to use the Nz() function
around the initial criteria to convert a null field to
0. I think this would work as follows (I'm not 100% sure
this will work with the aggregate function - I haven't
tried it in this manner):

Perc: iif(Nz(Sum(RBQSCR3and4!Address),0)>0,Sum
(RBQYes3and4!Address/RBQSCR3and4!Address),"N/A")

Hopefully that will help. Post back if you still have
problems.

-Ted
 
Back
Top