Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
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;
This can be a good read for understanding the difference between previous and peek.