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: 
shravanveer
Contributor II
Contributor II

use pervious function

hi

how to write script  two or more empty date  fields  to be filled with PREVIOUS function for given table below,

ID DATE
100 12-06-2022
101 13-06-2022
102  
103 15-06-2022
104  
105  
106 19-06-2022
Labels (1)
2 Replies
Vegar
MVP
MVP

Previous will look at the previous row in your source table. To solve this you can use Peek() instead. https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunc... 

Try this

LOAD
ID,
If(len(DATE)>0,DATE,Peek('DATE')) as DATE
FROM Source
Order by ID;

Vegar
MVP
MVP

This can be a good read for understanding the difference between previous and peek.

Use inter record functions