Forum Discussion

OPS-MLTSD's avatar
OPS-MLTSD
Icon for Post Patron rankPost Patron
5 years ago
Solved

IF Column is blank, then use another IF statement in created column

Hello, I am trying to create a new column called "New Ministry Role" based on an existing column called "Ministry Role" in my table. There is one blank value in the "Ministry Role" column, which is w...
  • darentengmfs's avatar
    darentengmfs
    5 years ago

    OPS-MLTSD 

     

    Just in case your client type is either "" or blank,

    New Ministry =
    IF(OR(ISBLANK([CLIENT TYPE]),[CLIENT TYPE]=""),IF([SOURCE_SYSTEM_CODE]="SAMS","MCCSS",""),

    SWITCH([CLIENT TYPE],"MCCSS NOT REFERRED","MCCSS","MCCSS REFERRED","MCCSS","MLTSD NOT REFERRED","MLTSD","NO USER","NO MINISTRY","UNHAPPY PATH","MCCSS"))

     

    What this will do is it will search Client Type for either Blank or "". If it is, then it will look for Source System Code. So if Client Type = Blank or "" and if Source System Code = "SAMS", then it will give you "MCCSS". If it is not blank or "", it will look at Client Type, where if Client Type ="MCCSS NOT REFERRED", then it will give you "MCCSS" and so on. SWITCH works similarly as IF function.