Forum Discussion
ecl
7 years agoFrequent Visitor
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...
- 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" } )
Gordonlilj
7 years agoSolution Sage
Hi,
Try something like
CALCULATE(MktShr[Deal Count], FILTER(MktShr[Product Group] = "Mid Office" || MktShr[Product Group] = "Mid-GD"
|| MktShr[Product Group] = "Mid-Compliance" || MktShr[Product Group] = "Value4" || MktShr[Product Group] = "Value5" || MktShr[Product Group] = "Value6")).
Just change "Value#" and it should work (if i understood the issue correctly).