COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Event Studio => Topic started by: gops210 on 06 Mar 2012 05:44:57 PM

Title: Multiple Instances
Post by: gops210 on 06 Mar 2012 05:44:57 PM
Hello all,

Is it possible in eventstudio to check for two conditions like below.

(([Dataitem1] = 'A' and [Dataitem2] >0) and ([Dataitem1] = 'B' and [Dataitem2] >0)

This is not working for me.Only one condition im able to test at a time.Please help.

Thanks in advance.
Title: Re: Multiple Instances
Post by: Lynn on 07 Mar 2012 07:06:41 AM
I think the problem lies with your expression. It should be a boolean that results in either true or false.

Your expression can only ever resolve to false because you have "and" between the two conditions. Can [Dataitem1] EVER be equal to 'A' AND equal to 'B' at the same time? Nope. It can't. Also, you have an extra parenthesis at the start which is incorrect syntax.

Maybe one of these two expressions is what you really mean to check for:

([Dataitem1] = 'A' and [Dataitem2] >0) or ([Dataitem1] = 'B' and [Dataitem2] >0)



([Dataitem1] in ( 'A', 'B' ) and [Dataitem2] >0)