Discussion Board for collaboration on QlikView Scripting.
I am currently working on a problem in which I want to look at the previous value of the row and which I can achieve by using Peek function. How can I look at the next value at the same time?
I want to be able to look at both at the same time. Please let me know if you need any more information. Greatly appreciate your help.
you can achieve this using the Peek function using its parameters like this:
peek( 'Sales',-1 ) - returns the value of Sales in the previous record read ( equivalent to previous(Sales) ).
peek( 'Sales', 1 ) - returns the value of Sales from the second record read from the current internal table.
Hope this helps.
Thank you for your response.
I m confused now. Would you please verify my two statements below?
If I am at row 1000,
Thank you very much for your help.
For 2nd Point,
The data for the Peek() function is loaded from the previously loaded table in the associative QlikView database.
Peek() or Previous() ?
Yes your assumption is right.
Both will be working on top of loaded tables.
Here you have an example:
load * inline [
PREVIOUS(b) as PREV,
PEEK('b',RowNo(),'TABLE_AUX') as NEXT
DROP TABLE TABLE_AUX;
Please tell if this suits your needs.