Discussions

 View Only
  • 1.  Need help with if statement

    Posted 05-31-2018 23:17

    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.




  • 2.  RE: Need help with if statement

     
    Posted 05-31-2018 23:21
    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
    )
    )
    )


  • 3.  RE: Need help with if statement

     
    Posted 05-31-2018 23:31
    This isn't tested in any way, so you may have to check the syntax closely.


  • 4.  RE: Need help with if statement

    Posted 05-31-2018 23:58
    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])


  • 5.  RE: Need help with if statement

    Posted 08-08-2018 20:02
    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)