Skip to main content
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: 
Kota77
Contributor
Contributor

Working of PEEK and PREVIOUS Functions

In the below script wanted to know the difference between Peek and Previous functions

So when Iam trying that, the end result is same for both functionalities. Could anyone of you please help me with this.

Test:
  load
  Distinct(Month) as Month_1,
SaleAmount,

Previous(SaleAmount) as Previousamount,
peek(SaleAmount) as Peek_amount;

test1:
load  *  
Inline [
Month,SaleAmount

Jan,100
Feb,200
Mar,300
Apr,400
May,500
Jun,600
Jun,600

];

Output for the script :

sathvika_0-1688064598065.png

 

1 Solution

Accepted Solutions
maxgro
MVP
MVP

There is a detailed explanation of the difference here
https://www.naturalsynergies.com/q-tip-12-peek-or-previous/

 

View solution in original post

2 Replies
maxgro
MVP
MVP

There is a detailed explanation of the difference here
https://www.naturalsynergies.com/q-tip-12-peek-or-previous/

 

Kota77
Contributor
Contributor
Author

Thank you!!