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

How to use Peek function?

hi,

I do not know peek function ,how to use  that function please explain me with example.about peek function.

                               Thankyou,

Regards:

Madhu.

11 Replies
sureshbaabu
Creator III
Creator III

Hello,

Peek function returns the value of the previous record read.


For eg; In the output below,

  • Name and Value are my source columns
  • Expression for the other two:

     Peek('Value') as Peek_Value     

       – Stores the previous record value (this is same as Previous function)

     Peek('Value',1) as Peek_Value_1

     – Qlikview internally assigns values starting from ‘0’ ( ‘0’for the first row/record, ‘1’ for        the second row and so on).

       So, if we set the value as ‘1’. It reads the value at 2nd row and starts assigning the same        value from 3rd row

NameValuePeek_ValuePeek_Value_1
A1--
B21-
C322
D432
E542
F652

For More clarity & real time example, Please take a look at the document on

Peek() vs Previous() – When to Use Each

Hope this helps!!

Thanks

its_anandrjs