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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
oxiofrt
Partner - Creator
Partner - Creator

Does "IN" function exists in Qlikview syntax

Hi,
in a calculated dimension of a chart, I would like to simplify my syntax :

if(dimension = 1 or dimension =2 or dimension = 5 or dimension = 12, dimension)

Aimed syntax would look like if(dimension in(1,2,5,12), dimension)

Is it possible ? and how ?

Thanks a lot for your help

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi, oxioFRT,

For such purposes in QlikView I use Match (or Mixmatch) function.

In your case it will look like If(Match(dimension,1,2,5,12)>0, dimension).

In case you need to exclude some values, the script will be If(Match(dimension,1,2,3,12)=0,dimension)

Match function is case sensitive while Mixmatch isn't

Rgds,
Artjoms

View solution in original post

3 Replies
Anonymous
Not applicable

Hi, oxioFRT,

For such purposes in QlikView I use Match (or Mixmatch) function.

In your case it will look like If(Match(dimension,1,2,5,12)>0, dimension).

In case you need to exclude some values, the script will be If(Match(dimension,1,2,3,12)=0,dimension)

Match function is case sensitive while Mixmatch isn't

Rgds,
Artjoms

oxiofrt
Partner - Creator
Partner - Creator
Author

Great, thanks a lot for your help !

Anonymous
Not applicable

urw 😉