Handling division by 0 errors

  • Thread starter Thread starter tsison7
  • Start date Start date
T

tsison7

In a query I added another field with the equation: margin:[profit]/[price].
The problem is if the price is $0 (ie. free of charge) the query will not
run. I actually fixed this by adding a Max(0.00001, [profit]) into the
equation but there must be a better way.
 
Nevermind,

I'll use the iif ([Price]<>0, [Profit/Price], 0)...expression..
 

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

Back
Top