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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

wrong value with peek

Hi Folks,

i got a question, my table does look like (see attached file),

 

Case 161120.PNG

i want to fill out the value according previous value,  i tried to resolve this issue by using the function: peek () but i have the wrong value.

Does anybody know how to resolve this issue?

Thanks a lot in advance for help and feedback

Beck

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Take a look at the script below, it might help.

Table:
LOAD
   Project,
   Subproject,
   Invoice,
   InvoiceNo,
   if(len(Txt)>0,
      Txt,
      if(len(peek('Txt'))>0,
         peek('Txt'),
         'No value'
      )
   ) as NewText,
   Txt as Txt //You need this field, but it can be dropped after loading the data
Inline [
Project, Subproject, Invoice, InvoiceNo, Txt
a,a1,1,1,YD
a,a2,2,1,
b,b1,1,1,
b,b2,2,2
c,c1,1,1,yd1
c,c2,2,2
];
 

View solution in original post

3 Replies
Vegar
MVP
MVP

Take a look at the script below, it might help.

Table:
LOAD
   Project,
   Subproject,
   Invoice,
   InvoiceNo,
   if(len(Txt)>0,
      Txt,
      if(len(peek('Txt'))>0,
         peek('Txt'),
         'No value'
      )
   ) as NewText,
   Txt as Txt //You need this field, but it can be dropped after loading the data
Inline [
Project, Subproject, Invoice, InvoiceNo, Txt
a,a1,1,1,YD
a,a2,2,1,
b,b1,1,1,
b,b2,2,2
c,c1,1,1,yd1
c,c2,2,2
];
 

beck_bakytbek
Master
Master
Author

Hi Vegar,

thanks a lot for your help and time, i have a question: shoul i use then at the end the order by?

beck_bakytbek
Master
Master
Author

Vegar, thanks a lot for your help and your time