Formula help

  • 0
  • 1
  • Question
  • Updated 5 months ago
  • Answered
  • (Edited)
I need an If formula for the following...

If [field1] is equal to "CCO" then [field2]*.52
If [field1] is equal to "ASG-F" then [field2]*.20 
If [field1] is equal to "ASG-K" then [field2]*.80 
else [field2] is 0 or blank

Sorry but I am terrible at figuring out formula structures :-(
Photo of Mark Comish

Mark Comish

  • 620 Points 500 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Because you are testing the same field and there are no other conditions, you can use CASE.

Case([field1],
"CCO", [field2]*.52,
"ASG-F", [field2]*.20,
"ASG-K", [field2]* .80)

The formula above will calculate to null if the above conditions are not met. A null is different than a zero.

If you do want the result to be a zero if the conditions are not met then use

Case([field1],
"CCO", [field2]*.52,
"ASG-F", [field2]*.20,
"ASG-K", [field2]* .80,0)
Photo of Mark Comish

Mark Comish

  • 620 Points 500 badge 2x thumb
Thank you so much!

Mark