Calulations in queries

  • Thread starter Thread starter shannaj via AccessMonster.com
  • Start date Start date
S

shannaj via AccessMonster.com

I have a query in where I am tracking technician bonuses that are based on
the amount of units that they repair. My formula is as follows:
Jan Bonus: ((([Jan]-[MinimumUnits])*[PerUnitRate])+[QuotaAmt])

In order to bonus, they need to exceed the minumum number of units required.
If they exceed, my formula works perfect. If they do not exceed the minumum
number of units, then they should not bonus. With the way my formula works
now, there is still an amount, because of the [QuotaAmt] of $100. Is there
any way to plug in like an "If" function, or some other recommendation to
what I am doing?
 
Jan Bonus:
IIF([Jan]-[MinimumUnits]>0,([Jan]-[MinimumUnits])*[PerUnitRate])+[QuotaAmt]),0)
 
PERHAPS

IIF([Jan] >= [MinimumUnits],
((([Jan]-[MinimumUnits])*[PerUnitRate])+[QuotaAmt]),0)


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Thank you so much! That worked great!

John said:
PERHAPS

IIF([Jan] >= [MinimumUnits],
((([Jan]-[MinimumUnits])*[PerUnitRate])+[QuotaAmt]),0)
I have a query in where I am tracking technician bonuses that are based on
the amount of units that they repair. My formula is as follows:
[quoted text clipped - 10 lines]
any way to plug in like an "If" function, or some other recommendation to
what I am doing?
 
Back
Top