6 Replies Latest reply on Jan 19, 2017 8:06 PM by jbfmp11

# Discount Price Calculation

Ok, I know this should be a no brainer but it's cold here in Canada and I'm experiencing a brain fart right now, so please be gentle.

I want to offer a discount off a regular price. So, I have a field 'Regular Price", a field 'Discount' (which will be a percentage like 10% etc. And I have a field that will show the discounted price called, 'Discount Price'.

\$25.00 - 10% =?

Could someone please spell this out for me in step format so I can go in and get this one off my plate? I took a look at the FileMaker built in solutions for INVOICES and the way they accomplish this is by using variables and other fancy calculations. I'm still trying to get my head around variables so that is no help to me at the moment.

Thanks and have a great upcoming weekend.

Bob

• ###### 1. Re: Discount Price Calculation

Isn't the discount price, in this case -10% simply a calculation:

Regular Price * .9

Or am I contracting you're brain fart too?

• ###### 2. Re: Discount Price Calculation

Yes Steve, I believe the Discount Price field is a calculation field. I just need to know what goes inside of it.

• ###### 3. Re: Discount Price Calculation

Try

regularPrice * ( 1 - discount / 100 )

1 of 1 people found this helpful
• ###### 4. Re: Discount Price Calculation

Correct.

Thank you for this Erolst.  Worked flawlessly.

Bob

• ###### 5. Re: Discount Price Calculation

A great answer but I have another question. How would I make the number round up to the nearest 5 or 10?

• ###### 6. Re: Discount Price Calculation

Round to Nearest 5 cents

discountprice = Round ( price * ( 1 - discount/100 ) * 2  ; 1 ) / 2

e.g. price = 9.90, discount = 7.5 , discountprice = 9.15 (unadjusted = 9.16)

Round Up to Next 5 cents

discountprice = Round ( price * ( 1 - discount/100 ) * 2 + .04 ; 1 ) / 2

e.g. price = 9.90, discount = 7.5, discountprice = 9.20 (unadjusted = 9.16)

Note: for 0% discount, discountprice = original price to nearest/next 5 cents