Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Use Switch and OR

Hi,    Ive got a problem. I want to get multiple rules in a switch statement.. But its not working, only if u use OR-statement i can add 1 more rule..   Sample of the data/formula(its anonymized)...
  • Anonymous's avatar
    Anonymous
    7 years ago
    "There must be a better way, like :
    TEST =
    OR(SWITCH(
           TRUE(),
            SessionDetails[ReferredById]<>(1073,39050,440190,231049) 0,
            SessionDetails[User1Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816} ||
        SessionDetails[User2Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816}, 1,
            0)"
     
    Try
     
    TEST =
    SWITCH(
           TRUE(),
            NOT ( SessionDetails[ReferredById] IN { 1073,39050,440190,231049 } ), 0,
            SessionDetails[User1Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816} ||
        SessionDetails[User2Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816}, 1,
            0)