Rounding

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

I need help again:

I have a query in which I have the following:
Dose Billin Unit Billed Units
350 480 1
240 480 1
200 480 0

Billed Units are rounding to the nearest tenth. How I
can make it so it rounds to the closest following
number..For instance, 200/480 = 0.416 in which for
billing purpose, I will bill 1 unit instead of 0 or 1/2...
The samething if I have 3.14 as a result. I will bill
for 4 instead of 3 or 3.50

Thank you in advance.
 
It would help if you could post what the underlying table and your existing query looks like. But it sounds like you basically want to always round fractions up, in which case the following should do the trick:

iif([Dose] mod [Billing Unit] = 0,[Dose] / [Billing Unit],[Dose] / [Billing Unit] + 1)

There are probably more efficient constructions, but that should do the trick
 

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