Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Any Body explain functions (pick,previous,peek,lookup......), witch used in qlikview.
Please check enclosed file where PEEK, Previous, Lookup functions used...
To understand how these functions work, please refer QlikView Reference Manual..
Hi,
I explain you basics for the functions
1. Pick Function :-
Tab1:
Load
RecNo( ) As KeyNo,
Pick(3,'Table','Chair','Door') as KeyValue //in This only 3 value selected
AutoGenerate 3;
2. Peek Function :-
Peek( 'Sales', 2 )
Returns the value of Sales from the third record read from the current internal table.
3. Previous Function:-
TEMP:
LOAD * INLINE [
ID, Sale
34, 200
33, 300
34, 250
36, 340
34, 239
33, 123
33, 276
34, 267
33, 145
];
Example2:
Load *, Sale / previous(Sale) as Increase
Resident TEMP
Order by ID,Sale;
Drop table TEMP;
4. LookUp Function:-
Data:
LOAD * INLINE [
ProductID, Price
1, 1000
2, 2000
3, 3000
];
Let vSaleValue = Lookup('Price', 'ProductID', 3, 'Data');
Hope this helps
Thanks & Regards
When your interested in a particular field(s) in a certain table we can use the function of Peak to help us store our information into variables. Peek(Field_name, Row#, table name)
Peek(Field_name, Row#, table name)
Field_name = name of the respective fields that you want to extract
Row# : What record should it start on must be an interger.
table name: Tells Qlikview what table you are getting your information from *Note if you don't put anything here it will look at the statement before table and apply it there.
Now onto previous function
It is very similiar to the Peek operator. the peek targets the output that comes from the Load statement while previous targets the original input to the load statement.
*note if we use a WHERE clause we would get different results because of this.
Pick function
Its very similar to the INDEX feature if your familiar with excel let me explain it returns the Nth expression/string of a list . The first parameter checks the position and returns the appropriate expression/string
lookup function
Here is a link that does a good job explaining the concept.
Michael in Qlikview: Qlikview Lookup Function
Hope this helps!
Best regards,
Ahmed Ali