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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

get value from the previous row to fill the below null rows in data load editor

ID Date SEX AGE Product Purchased
1 07/30/2012 F 11 Pen Yes
        Pencil  
        Book  
2 05/07/2012 M 10 pen No
3 01/04/2012 F 45 Pen Yes
        Pencil  
        Book  
        marker  

 

Is there a way I could get something similar to below output:

ID Date SEX AGE Product Purchased
1 07/30/2012 F 11 Pen Yes
1 07/30/2012 F 11 Pencil Yes
1 07/30/2012 F 11 Book Yes
2 05/07/2012 M 10 pen No
3 01/04/2012 F 45 Pen Yes
3 01/04/2012 F 45 Pencil Yes
3 01/04/2012 F 45 Book Yes
3 01/04/2012 F 45 marker Yes
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

If the values are null you could do this :

Load If(isnull(ID) , peek(NewID), ID) as NewID,
If(isnull(Date), peek(NewDate), Date) as NewDate,
If(isnull(SEX), peek(NewSEX), SEX) as NewSex,
If(isnull(AGE), peek(NewAGE), AGE) as NewAGE,
Product,
If(isnull(Purchased), peek(NewPurchased), Purchased) as NewPurchased

from .....;

Or if there is a space you might try If(len(trim(ID))=0, Null(), ID) as NewID

 

View solution in original post

1 Reply
Lisa_P
Employee
Employee

If the values are null you could do this :

Load If(isnull(ID) , peek(NewID), ID) as NewID,
If(isnull(Date), peek(NewDate), Date) as NewDate,
If(isnull(SEX), peek(NewSEX), SEX) as NewSex,
If(isnull(AGE), peek(NewAGE), AGE) as NewAGE,
Product,
If(isnull(Purchased), peek(NewPurchased), Purchased) as NewPurchased

from .....;

Or if there is a space you might try If(len(trim(ID))=0, Null(), ID) as NewID