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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pick and Match example

Hi Guyz,

Help me a simple example with pick and match.

1 Solution

Accepted Solutions
ankali1990
Contributor III
Contributor III

Hi,

I like to use Pick and Wildmatch together.

Example:

Pick(WildMatch(Month, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),

    '01', '02', '03',  '04',  '05',  '06',  '07',  '08',  '09',  '10',  '11',  '12')

It will provide number value for the Month, based on the string value.

Hope it helps.

Regards.

View solution in original post

3 Replies
krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

Below is the syntax and example. if you share your requirement it will help us to give the right solution.

pick(n, expr1[ , expr2,...exprN])

Returns the n:th expression in the list. n is an integer between 1 and N.

Example:

pick( N,'A','B',4, , , )

returns 'B' if N = 2

returns 4 if N = 3

match( str, expr1 [ , expr2,...exprN ] )

The match function performs a case sensitive comparison.

Example:

match( M, 'Jan','Feb','Mar')

returns 2 if M = Feb

returns 0 if M = Apr or jan

ankali1990
Contributor III
Contributor III

Hi,

I like to use Pick and Wildmatch together.

Example:

Pick(WildMatch(Month, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),

    '01', '02', '03',  '04',  '05',  '06',  '07',  '08',  '09',  '10',  '11',  '12')

It will provide number value for the Month, based on the string value.

Hope it helps.

Regards.

otumiseng_madol
Contributor
Contributor

Thanks!!! this was great help!