cancel
Showing results for 
Search instead for 
Did you mean: 

Not Eqal to Operator for multiple values

Former Member
0 Kudos

Hi,

I am trying to exclude some personal areas for ex: 10 and 11 in the webi report. I wrote the below formula.

=If([Personnel Area].[Personnel Area - Key]<>"0010" Or [Personnel Area].[Personnel Area - Key]<>"0011";1;0) and it is not working. If I just do for one value =(If([Personnel Area].[Personnel Area - Key]<>"0042" ;1;0), it works. My datasource is bex query and we are 4.0. Please help me understand why this is not working for more than one value or how to make it work.

Thanks,

Charvi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Charvi,

Use =If(Not([Personnel Area].[Personnel Area - Key] InList("0010";"0011"));1;0)

Regards,

Mark

Former Member
0 Kudos

Hi mark,

That works. Thank you.

Regards,

Charvi.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Use "And" operator instead of "Or" operator. Your formula should work then.

Thanks.

Former Member
0 Kudos

Hi

Try with If ElseIf....

Sandeep

Former Member
0 Kudos

The formula that mark mentioned should work for you!!

How ever your formula should work as well 

=If([Personnel Area].[Personnel Area - Key]<>"0010" Or [Personnel Area].[Personnel Area - Key]<>"0011";1;0)

I was surprise why it did not work in the first place and  tested with a very similiar formula which worked for me.

=If([Mge Profit Center Name]<>"AUT"  Or [Mge Profit Center Name]<>"CSD" ;1;0)


Former Member
0 Kudos

That wouldn't work because different from 0010 OR different from 0011 means that it could be anything - both conditions void each other.