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

previous date

hi, 

 IF(IsNull(DATE), Previous(DATE), DATE) AS DATE it has been working for one empty  field  ,and i need same script for more empty fileds on the same table  like shown table

ID DATE
100 12-06-2022
101 13-06-2022
102  
103 15-06-2022
104  
105  
106 19-06-2022
Labels (1)
1 Reply
abhijitnalekar
Specialist II
Specialist II

Hi @shravanveer,

Please use below script

load*,
if(
len(trim(DATE))>0,DATE,
if(len(trim(DATE))=0 and len(peek(DATE))=0,
previous(Previous(DATE)),peek(DATE)
))as Datenew,


;

load *inline
[
ID,DATE
100,12-06-2022
101,13-06-2022
102,
103,15-06-2022
104,
105,
106,19-06-2022
];

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!