Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor III

why Pick() & match() can optimize better then IF ?

Hi All

From below post i have realise the above benefit of pick & match. Can some one share with me why ?


How can i avoid If in my expression in case i need to make the eXP chart show in +ve ?

1 Solution

Accepted Solutions

Re: why Pick() & match() can optimize better then IF ?

8 Replies

Re: why Pick() & match() can optimize better then IF ?

Hi Paul,

If condition will check one by condition checking, then it will execute the expression / value.

But, Pick function, directly goto the 'N' th Expression / Value.

suppose, if the 'N' value is 3,

if condition would be

if(N=1, 'One', if (N=2,'Two', if (N=3,'Three','> 3')))   => This one execute one by one..

But, if we use Pick.

Pick(N,'One','Two',Three')  =>  This will directly goto the third option..

You can see it here too

DailyQV: Using Pick and Match functions for Multiple ifs

Re: why Pick() & match() can optimize better then IF ?

Chanty4u
Esteemed Contributor III

Re: why Pick() & match() can optimize better then IF ?

nice explanation bro

Re: why Pick() & match() can optimize better then IF ?

paulyeo11
Valued Contributor III

Re: why Pick() & match() can optimize better then IF ?

Hi All

Thank you for give me so many link , i found some of the link very interesting. I think pick & match will be able to value a lot more to those people like me who have try IF like me and encounter problem.

Paul

Re: why Pick() & match() can optimize better then IF ?

Yes Paulyeo11

It all depends on the type of requirement and the amount of data that you need to handle ....with small data set you won't see much of the difference

paulyeo11
Valued Contributor III

Re: why Pick() & match() can optimize better then IF ?

I move this to top .as i encounter issue on this.

paulyeo11
Valued Contributor III

Re: why Pick() & match() can optimize better then IF ?

Hi Avinash

Now i finally understand what you said above . about if the data is small , it will not be affected on the report.

How to make Pivot table with Pick(Match compute faster for amount with -ve and +ve value ?

I have posted the above , and finally some one suggest to me , don't use Pick(Match and now my QV run very fast.

Any way this is good learning and it help me a lot,

Thank you once again for your sharing.

Paul