Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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.

Labels (1)
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