Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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