Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Difference between Peek() and Previous() function

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andreas_Giesbrecht

Difference between Peek() and Previous() function

Last Update:

May 10, 2022 3:21:58 PM

Updated By:

Jamie_Gregory

Created date:

Jul 18, 2019 3:53:19 AM

The two functions Peek() and Previous() are similar, but still fundamentally different. Previous() operates on the input to the Load statement, whereas Peek() operates on the output of the Load statement.

This means that it makes a big difference for Peek() if a field is included in the Load statement or not. But it doesn't affect Previous() at all.

Further, the two functions behave very differently if you combine them with a where clause: Previous() will look into the previous input record, whether this record has been accepted or not by the where clause. But Peek() will look into the last accepted record - the last record that passed the criterion of the where clause, which may be 5, 10 or 100 records back.

See more on Peek() vs Previous() – When to Use Each

 

Environment:

Qlik Sense Enterprise on Windows 
QlikView 
Qlik Cloud 
Qlik Sense Business 




 

 

Labels (2)
Version history
Last update:
‎2022-05-10 03:21 PM
Updated by: