First, there is no peak() function. There is peek().
Second, it is expained in "help", with examples.
Third - why you post this in "QlikView Jobs"?
Hi, Right Answer For ur Question
there is no function peak ?
It's an PEEK AND PICK FUNCTIONS
peek(field name [ , row [ , table name ] ] )
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.
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.
pick(n, expr1[ , expr2,...exprN])
Returns the n:th expression in the list. n is an integer between 1 and N.
pick( N'A''B'4, , , )
returns 'B' if N = 2
returns 4 if N = 3
Peek () Function -> The Peek() function can easily reference any previously loaded row in the table using the row number in the function e.g. Peek(‘Employee Count’, 0) loads the first row. Using the minus sign references from the last row up. e.g. Peek(‘Employee Count’, -1) loads the last row. If no row is specified, the last row (-1) is assumed. The Previous() function needs to be nested in order to reference any rows other than the previous row e.g. Previous(Previous(Hires)) looks at the second to last row loaded before the current row.
Pick() Function -> Pick Function Is Useful For Pick the data vales from the data point
…will return Bolton if N=1 or it will return Smith if N=3.
Pick function. Similar logic would require a nested if function..
If(N=1, ‘Bolton’, if(N=2, ‘Underwood’, ‘Smith))
Now that you know powerful QV Pick function is, let’s explore some practical usage. I have found Pick function adding simplicity to my code when I blend it with other powerful QlikView functions such as Match or Ceil functions.
Let vMin = Date(Peek('ShipDate',0),'DD-MM-YYYY');
let vMax = Date(Peek('ShipDate',-1),'DD-MM-YYYY');
The first query will return min date & the second query will return max data.
This function will return “MinDate” is the minimum date is selected in the list box
Peek(): Used to retrieve specific row from the field(column) from a specific position. The Fieldname should be in single quotes which is mandatory.
--> peek('Fieldname', Position, TableName)
Position 0 = Returns First record
Position -1 = Returns Last Record.
--> pick(): Returns the nth Expression in the list.
N is an integer between 1 and N.
Returns 'A' if N=1
Returns 'B' if N= 4