Replacing Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that performs a calculation. The two fileds are QOH and Weekly Sales. I divide those two values to get a value for this new field. I get a #error when I divide when both values are 0 because you can't divid 0 into 0. Is there a way to replace all the #error values with 0. is so how would I accomplish this.
 
I have a query that performs a calculation. The two fileds are QOH and Weekly Sales. I divide those two values to get a value for this new field. I get a #error when I divide when both values are 0 because you can't divid 0 into 0. Is there a way to replace all the #error values with 0. is so how would I accomplish this.

Try:

IIF([Weekly Sales] = 0, 0, [QOH] / [Weekly Sales])
 
Back
Top