Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Match Function on Interger

Hi All,

I'm using the match function in an IF statement (see below),

and was wondering if this is the optimal way to do it,

I'm having second thoughts since it takes alot of time to evaluate the results

(IF(match(PageType, '1', '4', '5', '8', '16', '20', '22', '23', '24', '24'),1 , 0)

5 Replies
Chanty4u
MVP
MVP

did u try remvng the single quotes?

MayilVahanan

HI

Suppose if you are using in same condition in different location, then try like this. Store in the variable and use wherever you need.

Its number, no need for single quotes.

Set vNumber = 1, 4, 5, 8, 16, 20, 22, 23, 24, 24;

Load *, If(match(PageType, $(vNumber) ),1 , 0) as Flag Inline

[

PageType

1

2

3

4

5

6

7

8

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Removing quotes did not changed the evaluation time,  (about 23 minutes)

Anonymous
Not applicable
Author

your expression is write try your expression but small change 1,0 but the your column name and try that way

Anonymous
Not applicable
Author

(IF(match(PageType, '1', '4', '5', '8', '16', '20', '22', '23', '24', '24'),PageType)

try this expression