Link to home
Start Free TrialLog in
Avatar of ILFAC
ILFAC

asked on

Divide by zero

Hello, I am having a problem with access 2010 report equation.  I'm trying to get the percent to show zero if LYDayDol = 0.  I keep getting the error ...wrong number of arguments...

=IIf([LYDayDol <>0,Sum([ActDayDol])-Sum([LYDayDol])/Sum([LYDayDol]),0)
ASKER CERTIFIED SOLUTION
Avatar of Member_2_6293206
Member_2_6293206

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ILFAC
ILFAC

ASKER

it worked but I had to put parens around the sums to make sure the calculation took place first and then the test for zero.  having the test for zero with the parens resulted in funky percents if divisor was not zero.  Thanks though, good job!