Forum Discussion

CMoppet's avatar
CMoppet
Helper IV
2 years ago
Solved

Conditional Column if value appears within a list

Hello,     I have a conditional column in a table called 'WO DATA' with various clauses based on the values in a column called 'Account NAME'.  It's straightforward because I can reply on the accou...
  • AmiraBedh's avatar
    AmiraBedh
    2 years ago

    Try the following :

    Column =
    IF(
        [SAP Account Id] IN {5300023122, 5300023123, 5300023124, 5300023125, 5300023126, 5300023127, 5300023129, 5300023130, 5300023132, 5300023131},
        "EMCOR",
        IF(
            CONTAINSSTRING([Account Name], "Waitrose"),
            "Waitrose",
            IF(
                CONTAINSSTRING([Account Name], "John Lewis"),
                "John Lewis",
                IF(
                    CONTAINSSTRING([Account Name], "Thames Water"),
                    "Thames Water",
                    IF(
                        CONTAINSSTRING([Account Name], "WSP"),
                        "WSP",
                        BLANK() 
                    )
                )
            )
        )
    )