Forum Discussion

sully343's avatar
sully343
Frequent Visitor
3 years ago
Solved

Multiple If statement

I've tried multiple ways and can't seem to get this to work...

 

I want to look at the columns FMLAIntermittent and Assignment 

 

If FMLAIntermittent is null and assignment is not: Training, Other, Communications

 

if both are true: Ops

otherwise, NULL

 

 

 

OPS = IF(LongTermLeaveStatus[FMLAIntermittent] = NULL && (LongTermLeaveStatus[Assignment] <> "Training" || LongTermLeaveStatus[Assignment] <> "Other"), "Ops", Blank)

 

 

  • Hi sully343 ,

     

    You could try below code:-

    OPS =
    IF (
        AND (
            LongTermLeaveStatus[FMLAIntermittent] = BLANK (),
            LongTermLeaveStatus[Assignment] IN { "Training", "Other" }
        ),
        "Ops",
        BLANK ()
    )

3 Replies

  • FarhanAhmed's avatar
    FarhanAhmed
    Community Champion

    Try below

     

    OPS = IF(ISBLANK(LongTermLeaveStatus[FMLAIntermittent])=TRUE && (LongTermLeaveStatus[Assignment] <> "Training" || LongTermLeaveStatus[Assignment] <> "Other"), "Ops", Blank)
  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi sully343 ,

     

    You could try below code:-

    OPS =
    IF (
        AND (
            LongTermLeaveStatus[FMLAIntermittent] = BLANK (),
            LongTermLeaveStatus[Assignment] IN { "Training", "Other" }
        ),
        "Ops",
        BLANK ()
    )
    • sully343's avatar
      sully343
      Frequent Visitor

      That worked! I just switched the "ops" and Blank response, but it did what I needed it to! Thank you!