Forum Discussion

einrikr's avatar
einrikr
Frequent Visitor
6 years ago
Solved

IF statement with multiple columns and logical tests

  Hi all, I’m trying to make a column with values from several other columns: If Validation Result OET = “obligatory test” and Validation Date OET = blank, new column should say: “obligatory...
  • Greg_Deckler's avatar
    6 years ago

    So something like the following?

     

    Column = 
      SWITCH(
        TRUE(),
        [Validation Result OET] = “obligatory test” && ISBLANK([Validation Date OET]), "obligatory test",
        [Days to DET Validation Deadline] < 0 && ISBLANK([Validation Date DET]), “Not Timely”,
        [Days to OET Validation Deadline] < 0 && ISBLANK([Validation Date OET]), “Not Timely”,
        [Days to DET Validation Deadline] <= 30 && ISBLANK([Validation Date DET]), “0-30”,
        [Days to OET Validation Deadline] <= 30 && ISBLANK([Validation Date OET]), “0-30”,
        [Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK(Validation Date DET), "30-60",
        [Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK([Validation Date OET]), “30-60”,
        “over 60”
      )

     Warning, probably a few syntax errors hiding in there but this should provide the concept.