
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what is pick function where to we use ?
what is pick function where to we use ?
thanks advance
- Tags:
- new_to_qlikview
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use PICK function any where (script or UI) in qvw.
Generally You can use where the expressions changes automatically on user selections.
Simple case: The user requested and needs show only one expression in the chart either Order Value or No of Orders and users can switch between on any one what he needs.
for the above requirement, create a Variable and create the Input and enter the predefined the values.
Let vExpression= { Order Value , No of Orders }
Expression: PICK( Match('$(vExpression)','Order Value','No of Orders') , SUM(ORDER_AMOUNT) , COUNT(ORDER_ID))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manoj,
I would suggestion you to use help file in QlikView or try your best to find in community. There are lots of topic talking about this.
Rgds,
Sokkorn


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below video may be helpful to understand pick function completely

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use PICK function any where (script or UI) in qvw.
Generally You can use where the expressions changes automatically on user selections.
Simple case: The user requested and needs show only one expression in the chart either Order Value or No of Orders and users can switch between on any one what he needs.
for the above requirement, create a Variable and create the Input and enter the predefined the values.
Let vExpression= { Order Value , No of Orders }
Expression: PICK( Match('$(vExpression)','Order Value','No of Orders') , SUM(ORDER_AMOUNT) , COUNT(ORDER_ID))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manoj,
i have used pick function in charts-----suppose different colors for different dimension values.
for example-expression--->backgroundcolor---->pick(match(country,'india','usa','uk'),red(),blue(),green()).
regards
Mahesh T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far I have studied from Qlikview Developers 11 book, Pick function is an alternative to the If(then_condition,
else_condition). If() is very memory intensive and nested if() can consume heavy resources, it should be avoided and instead Pick function should be used. Below is the explanation from the Book:
The parameters this function takes are:
Pick(n, expr1, expr2)
Where n is an integer number that determines which of the subsequent expressions
should be evaluated. expr1 is an expression to be evaluated when n= 1 and expr2 is
an expression to be evaluated when n= 2
The same result of the Pick function can be accomplished using a nested If;
for example:
If (n = 1, expr1, If(n = 2, expr2))
However, we can easily see that the Pick function is much simpler to use in this case
and can even be lighter in terms of resource usage.
For more details you can lookup the Qlikview for Developers 11 book.
Hope this helped.
