Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gkcchowdary
Creator
Creator

what is pick function

Hi tell me pick function with example ,I know qlik view help,I what another example

9 Replies
Not applicable

There is a really useful ability on the community called 'search'. If you use this you'll find a number of threads already created on the subject.

Search.png

Not applicable

peek(fieldname [ , row [ , tablename ] ] )

Returns the contents of the fieldname in the record specified by row in the internal table tablename. Data are fetched from the associative QlikView database.

Fieldname must be given as a string (e.g. a quoted literal).

Row must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read.

If no row is stated, -1 is assumed.

Tablename is a table label, see Table Labels, without the ending colon. If no tablename is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included.

Examples:

peek( 'Sales' )
returns the value of Sales in the previous record read ( equivalent to previous(Sales) ).

peek( 'Sales', 2 )
returns the value of Sales from the third record read from the current internal table.

peek( 'Sales', -2 )
returns the value of Sales from the second last record read into the current internal table.

peek( 'Sales', 0, 'Tab1' )
returns the value of Sales from the first record read into the input table labeled Tab1.

Load A, B, numsum( B, peek( 'Bsum' ) ) as Bsum...;
creates an accumulation of B in Bsum.

Missing Manual - Peek()

Not applicable

Hi Use this Code:

PEEK_TABLE:

LOAD KEY,Quantity,Peek(Quantity) as Previous_Quantity INLINE [

KEY , Quantity

1, 15

2, 25

3, 35

4, 45

5, 55

];

Capture.JPG

Not applicable

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

if u want information about function in personal edition click on help section ->usinghelp -> index -> type what u want serch

jagan
Luminary Alumni
Luminary Alumni

Hi,

Pick() will return the value in the given position.  For example

=Pick(Ceil(Month(Today())/3), 'Q1', 'Q2', 'Q3', 'Q4')

Today is 7th month so Ceil(Month(Today())/3) will return 3 so it returns Q3.

Hope this helps you

Regards,

jagan.

Siva_Sankar
Master II
Master II

A simple Example:

You have two expressions say eg: (3+5) and (1+2) and you want to pick 1 expression as output, you can use pick function here by mentioning which expression you want as output.

refer the screenshot below.

if you use =Pick(1, (3+5),(1+2))  then the first expression will be the output.

Siva_Sankar
Master II
Master II

Siva_Sankar
Master II
Master II

If you want more explanation watch this video..Pick Function in QlikView - YouTube