Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
ActivityID | ActivityChild | Date |
4613 | - | 2013-09-23 |
4614 | - | 2013-09-27 |
4615 | 4614 | - |
4619 | 4614 | - |
4620 | 4614 | - |
4621 | 4614 | - |
4616 | 4614 | - |
4617 | 4614/4616 | - |
4618 | 4614/4616 | - |
4622 | - | 2013-11-23 |
4623 | 4622 | - |
4628 | 4622 | - |
4624 | 4622 | - |
4625 | 4622 | - |
How I want the data to look:
ActivityID | ActivityChild | Date |
4613 | - | 2013-09-23 |
4614 | - | 2013-09-27 |
4615 | 4614 | 2013-09-27 |
4619 | 4614 | 2013-09-27 |
4620 | 4614 | 2013-09-27 |
4621 | 4614 | 2013-09-27 |
4616 | 4614 | 2013-09-27 |
4617 | 4614/4616 | 2013-09-27 |
4618 | 4614/4616 | 2013-09-27 |
4622 | - | 2013-11-23 |
4623 | 4622 | 2013-11-23 |
4628 | 4622 | 2013-11-23 |
4624 | 4622 | 2013-11-23 |
4625 | 4622 | 2013-11-23 |
How can I do this? Any help would be appreciated!
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
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
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!