Newbies Essenceprt Posted April 26, 2004 Newbies Posted April 26, 2004 Can anyone help with a calculation? My current formula is total cost is : (quantity/amount basis)* rate * distance. But if my total cost is less than $10.00, I want the value automatically to be entered $10.00. Obviously, if zero, it will be zero. Thanks Essenceprt
smorr Posted April 26, 2004 Posted April 26, 2004 Try this -- as a custom function or simply in a calculation if(amount basis = 0; // test for division by zero //then 0; //else let (cost=Quantity/amount basis * rate * distance; case ( cost = 0; 0; cost < 10; 10; cost) ) //let )// if [code]
Damocles Posted May 6, 2004 Posted May 6, 2004 How about TotalCost is a calculated field with the following: Case((quantity/amount basis)* rate * distance=0,0,(quantity/amount basis)* rate * distance 10,(quantity/amount basis)* rate * distance,10) Haven't tested this, so it may be humorous at best. Paul
bruceR Posted May 9, 2004 Posted May 9, 2004 I'm not sure how in practice you end up with zero - Qty = 0? But you can use the max function: Case( quantity=0,0, Max(rate * distance * quantity/amount basis,10) )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now