I would recommended you to do that by using "Edit Script > Table Files > Next > Enable Transformation Step > Tab Fill > Click on Fill Button Left Side > and Put your condition".
It's proper way which gives you long term solution as well as there are so many others features available which helps you in future just explore them.
thank you for your answers, unfortunately, I didn't figure out to make it work.
I have tried :
if(isnull(Status_before) and isnull(Status_after) and previous(XXX)=XXX, peek(Status_after), Status_before) as Status_before,
but it doesn't work I have also tried with previous instead of peek.
one solution could be:
LOAD XXX, If(Len(Status_before) or XXX<>Previous(XXX),Status_before,Peek(Status_after)) as Status_before, If(Len(Status_after) or XXX<>Previous(XXX),Status_after,Peek(Status_after)) as Status_after, Timestamp INLINE [ XXX, Status_before, Status_after, Timestamp A, lala, lili, 01/01/2015 03:00:00 A,,, 01/01/2015 04:00:00 A,,, 01/01/2015 05:00:00 A, lili, lulu, 01/01/2015 05:15:34 B, xaxa, xixi, 01/01/2015 03:43:35 ];
hope this helps
QlikCommunity_Thread_148784.qvw 150.0 K
there must be something wrong.
I have tried (just to see if at least this would work) :
peek(Status_before) as Status_before2
And I get :
XXX Status_before Status_after Timestamp Status_before2
A lala lili 01/01/2015 03:00:00 -
A - - 01/01/2015 04:00:00 lala
A - - 01/01/2015 05:00:00 -
A lili lulu 01/01/2015 05:15:34 -
B xaxa xixi 01/01/2015 03:43:35 lili
The peek function give me the previous value but if the previous value is null, I do get a null instead of getting the last not null value