Discussion Board for collaboration on QlikView Scripting.
I have loaded a table from a data source.
Now I want to perform some transformations whereby I need to know the value of the next record to add new fields. I know PEEK lets me go back, but is there anything that I can see 1 record ahead?
Go to Solution.
You can look ahead using peek(). peek() row is 0 based and recno() is 1 based, so it's easy to look ahead one record like this:
data:LOAD * INLINE [XABC];data2:LOAD X, peek('X', recno(), 'data') as YRESIDENT data;
Order it the other way around and use Peek :-)
that's what i am trying but thought there must be a better way. i want to avoid multiple loads of the same table to be able to do one thing.
that is it. i was playing around with it but didn't know how to use it. problem SOLVED! thanks.
I am trying the above code,
but it is really not working in my case
This is the excel table I created
This the script
peek('Z',recno(),'data') as PEEK
In column PEEK I end up with all fields marked with '-'