Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jonesbrown
Creator
Creator

Difference between Peek and Previous Function give me an example

Hi All

I am new to Qlikview

Difference between Peek and Previous Function give me an example 

plz help.

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Peek() looks in your destination table  but Previous() refers to your source table.

 

Consider this script:

TMP:
LOAD * inline [
FIELD
A
B
C
D
E
];

LOAD 
  '#'  & RowNo() & FIELD as FIELD ,
  FIELD as [Original],
  Peek(FIELD) as [Peek],
  Previous(FIELD) as [Previous]
Resident TMP;

DROP TABLE TMP;

 

The output will look like this:

image.png

View solution in original post

3 Replies
Vegar
MVP
MVP

Peek() looks in your destination table  but Previous() refers to your source table.

 

Consider this script:

TMP:
LOAD * inline [
FIELD
A
B
C
D
E
];

LOAD 
  '#'  & RowNo() & FIELD as FIELD ,
  FIELD as [Original],
  Peek(FIELD) as [Peek],
  Previous(FIELD) as [Previous]
Resident TMP;

DROP TABLE TMP;

 

The output will look like this:

image.png

ashwanin
Specialist
Specialist

https://www.qliktastic.com/2016/02/08/qlikview-previous-and-peek-are-not-the-same/

Go through this article. It will help you for your answer