Forum Discussion

ecl's avatar
ecl
Frequent Visitor
7 years ago
Solved

Creating Column to Evaluate field using OR or similar function

I need to create a new Calculated Column that counts the occurences of another field with six arguments. First tried using the OR function. But, the OR function only works with two arguments and I ne...
  • parry2k's avatar
    7 years ago

    ecl you can use || for OR instead of using OR function

    MidOfc Count = 
    CALCULATE(MktShr[Deal Count],
    MktShr[Product Group] = "Mid Office" || MktShr[Product Group] = "Mid-GD"
    || …. 
    )
    
    

    you can also use IN

     

    MidOfc Count = CALCULATE(MktShr[Deal Count], MktShr[Product Group] IN
    { "Mid Office" , "Mid-GD" , "next value", "next value" } )