Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a requirement to take the previous records based on the below logic
f dependent =0 then pass 0.
if dependent=previous(taskname) then pass previous end time
next to that dependent = above of task name then that rows end time.
branch id | branchlevel | taskname | dependent | start time | endtime |
1 | 1 | data layer.qvd | 22/09/2020 10:00:00 am | 22/09/2020 10:10:00 am | |
1 | 2 | businesslayer.qvd | data layer.qvd | 22/09/2020 10:10:00 am | 22/09/2020 10:20:00 am |
1 | 3 | present1.qvd | businesslayer.qvd | 22/09/2020 10:21:00 am | 22/09/2020 10:25:00 am |
1 | 4 | present2.qvd | businesslayer.qvd | 22/09/2020 10:21:00 am | 22/09/2020 10:24:00 am |
1 | 5 | present3.qvd | businesslayer.qvd | 22/09/2020 10:21:00 am | 22/09/2020 10:24:00 am
|
dependent =0 . first condition will get 0. how to write a script to get the 2nd and 3rd condition.. to take the previous records . dependent= previous(taskname).. sometimes the records may be two rows above our row..i mea
did you tried this?
instead of previous use above
=above(Dependent)
You may need to load things into resident table and then use Order or Group by function to reload the resident table in the order you specify to be able to get things to work as you want I believe, hopefully that may be what you are missing.
https://community.qlik.com/t5/Qlik-Design-Blog/Preceding-Load/ba-p/1469534
Hopefully those may be of some help.
Regards,
Brett