Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
nirkatz123
Contributor

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)

Tags (1)
5 Replies
Chanty4u
Esteemed Contributor III

Re: Match Function on Interger

did u try remvng the single quotes?

Re: Match Function on Interger

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

];

nirkatz123
Contributor

Re: Match Function on Interger

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

vsudhakar
Contributor III

Re: Match Function on Interger

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

vsudhakar
Contributor III

Re: Match Function on Interger

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

try this expression