Forum Discussion

PBIn00b's avatar
PBIn00b
Advocate II
9 years ago
Solved

Using SWITCH with OR (or Multple Criteria)

Is there a way to add a second columns criteria to a SWITCH function?   In short, I would like to make a calculation if the STORE # = one of a list OR if the beginning of the Coupon = a certain...
  • v-sihou-msft's avatar
    9 years ago

    PBIn00b

     

    In SWITCH() function, we can only put single column to apply condition. Since you need another column for applying condition, you have to use nested IF() to achieve your goal.

     

    Regards,

  • richbenmintz's avatar
    richbenmintz
    9 years ago

    with the switch statement you can use a test for TRUE() as your evaluation criteria; eg: calc=switch(true(), blah=blah && foo=bar, 1, bar=blah || foo=foo, 2, 3)