Need help with if statement

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered

I have a multi-conditional if statement. I have tried it both as a text and number format. I need it to be along the lines of:

if([ibo position]="marketing manager with HOS",[commercial team total],[ibo position]="Marketing manager w/o hos",[Commercial team total],[ibo position]="Platinum Marketing Manager with HOS",[Commercial Team Total],null)

I have also tried it as a case statement. The commercial team total is a number field, I need it to recognize if any of these three conditions are true I need it to return the value in the commercial team total field, otherwise nothing.


Photo of Amanda Svaleson

Amanda Svaleson

  • 100 Points 100 badge 2x thumb

Posted 6 months ago

  • 0
  • 1
Photo of Rob White IV

Rob White IV

  • 948 Points 500 badge 2x thumb
You have to nest the IF statements.  Try this.

If([ibo position] = "marketing manager with HOS", [commercial team total],
If([ibo position]="Marketing manager w/o hos",[Commercial team total],
If([ibo position]="Platinum Marketing Manager with HOS",[Commercial Team Total],
null
)
)
)
Photo of Rob White IV

Rob White IV

  • 948 Points 500 badge 2x thumb
This isn't tested in any way, so you may have to check the syntax closely.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,466 Points 50k badge 2x thumb
A shorter syntax is

If(
[ibo position] = "marketing manager with HOS", [commercial team total], 

[ibo position]="Marketing manager w/o hos",[Commercial team total],

[ibo position]="Platinum Marketing Manager with HOS",[Commercial Team Total])
(Edited)
Photo of Jason

Jason

  • 1,012 Points 1k badge 2x thumb
Here is a Case in case

Case([ibo position],

"marketing manager with HOS", [commercial team total], 

"Marketing manager w/o hos",[Commercial team total],

"Platinum Marketing Manager with HOS",[Commercial Team Total],

Null)