Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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