SUBTRACT MULTIPLE FIELDS

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • Answered
Hello I am trying to subtract multiple fields.  Here is what I am trying to do:

((payment amount) - (client fee) - (override) )/2

The main problem I am having is the override field has blanks so it does't recognize the formula.  Perhaps the field types need to be changed?

Payment amount - Currency Field
Client Fee - Currency Field
Override - Formula - Numeric

Thanks for your help.
Photo of Jake

Jake

  • 130 Points 100 badge 2x thumb

Posted 8 months ago

  • 0
  • 1
Photo of Dan

Dan

  • 1,176 Points 1k badge 2x thumb
Try this:
Sum([Payment amount],-[Client Fee],-[Override])/2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
You have two choices.
Set the properties of the [override] field to treat blank as zero.

or else

([payment amount] - [client fee] - Nz([override]) )/2

The Nz function will change a null numeric to a zero.
Photo of Jake

Jake

  • 130 Points 100 badge 2x thumb
Awesome... that worked!  Thank you!