Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My script looks as follows:
InvoiceLine:
LOAD
previous([Shipment No_]) as PS,
peek([Shipment No_]) as PS2,
[Shipment No_]
FROM
InvoiceLine.QVD
(qvd)
where (Type <> 0);
In the manual I find the following lines:
The return value of PS2 (the peek statement in my script) is the value from the previous line and therefore correct.
The return value of PS (the previous statement in my script) is the value from the current line and therefore not correct.
I tried to figure out why the result in my script of the peek command differs from the previous command, but until know I have no idea.
Any explanation is welcome.
Regards,
Gerrit
Peek() and Previous() have a basic difference when you use a FILTER (where clause) in load. Peek() operates on OUTPUT of source and Previous() operates on INPUT of source. For better understanding please refer this
Peek() and Previous() have a basic difference when you use a FILTER (where clause) in load. Peek() operates on OUTPUT of source and Previous() operates on INPUT of source. For better understanding please refer this
Hi.
Previous refers to the data coming from your DB, data source. Peek refers to the values you already have stored in QlikView data model, with the transformations that you have made.
Peek can be used from any table, any record being -1 the last one, (default), 0 the first record of the table, 1 the second, -2 the before last, -3 the before, before last, etc.
Thanks that makes it clear.