Jump to content

This topic is 7573 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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]

  • 2 weeks later...
Posted

How about TotalCost is a calculated field with the following:

Case((quantity/amount basis)* rate * distance=0,0,(quantity/amount basis)* rate * distance great.gif 10,(quantity/amount basis)* rate * distance,10)

Haven't tested this, so it may be humorous at best. smile.gif

Paul

Posted

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) )

This topic is 7573 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.