Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

not equal to set of values in IF

I want to give in expression for example

=if(Code <> 100 and Code <> 101,Name) this is working fine, but if we have more than 10 values how should we define...is there any other way without giving and condition again and again......like

=if(Code <> (100,101),Name)

This is  not working only 100 is valid (showing in red) and 101 is turning to black so error in expression. Thanks

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

You may use the Match function as follows:

If (Match(Code,100,101,102) =0, Name)

View solution in original post

4 Replies
shree909
Partner - Specialist II
Partner - Specialist II

if u have 10 values  use the set analysis

sum({<code={' 10 values separated by coma'>} Name)

or

if(code>100 and code <111, name)

Not applicable
Author

You can use Set Analysis in your expression, and write something like:

Count({<Code -= {100, 101, 102}>} Name)

OR

Count({<Code = Code - {100, 101, 102}>} Name)


Regards,

nagaiank
Specialist III
Specialist III

You may use the Match function as follows:

If (Match(Code,100,101,102) =0, Name)

Not applicable
Author

I dont want to Use set analysis. Thanks