Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load script question

I have a table containing a date field but not all rows in the database have a date since some rows represent children to a previous row and in the application they inherit the date from the parent row by default.

In order for this to work in QlikView I would like to replace any null in the date field with the date from the previous row with an existing date (since that row will always be the parent)

Example of the table:

ActivityIDActivityChildDate
4613-2013-09-23
4614-2013-09-27
46154614-
46194614-
46204614-
46214614-
46164614-
46174614/4616-
46184614/4616-
4622-2013-11-23
46234622-
46284622-
46244622-
46254622-

How I want the data to look:

ActivityIDActivityChildDate
4613-2013-09-23
4614-2013-09-27
461546142013-09-27
461946142013-09-27
462046142013-09-27
462146142013-09-27
461646142013-09-27
46174614/46162013-09-27
46184614/46162013-09-27
4622-2013-11-23
462346222013-11-23
462846222013-11-23
462446222013-11-23
462546222013-11-23

How can I do this? Any help would be appreciated!

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

2 Replies
hic
Former Employee
Former Employee

You can use the peek function to populate the fields. See an example here: http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/05/populating-a-sparsely-populated-field

HIC

Not applicable
Author

Thanks alot. I got stuck on trying to use Previous instead of Peek which was why I couldn't get it to work. Now it's perfect!