# How do I correctly write this math formula so that QB follows the order of operations to obtain the correct value?

• 0
• Question
• Updated 4 years ago

This is really just my lack of understanding on where the () go to ensure QB calculates the value I'm looking for.

The equation is [Amount Offered] - [Total Adjusted chargeback] * .25 + 25

So I need it to first subtract the built in fields, then multiply that answer by .25 then add 25 to the result of the multiplication.

Example: 1000 - 500 * .25 + 25

So

1000 - 500 = 500

500 * .25 = 125

125 + 25 = 150

Thank you!

• 82 Points

Posted 4 years ago

• 0
• 70,354 Points
([Amount Offered] - [Total Adjusted chargeback]) * .25 + 25

In excel and QuickBase the rules of math the order of operations goes by BOMDAS - I remember that from Grade school.

Brackets

Of ( cheat way to get a vowel so its pronounceable, as if 5% "of" 100 - which is really multiplication.)

Multiplication and Division

ie Multiplication and Divisions are done first in the order they appear, and after that, then Addition and Subtractions.

Of course you can clutter up everything with extra layers of brackets, but yuk, it gets messy to read.
• 82 Points
I copied and pasted your text and it's not giving me the correct answer. The specific values it's calculating are as follows:

Amount Offered \$1,186.00