I would take all the practices that have state 40 but did not have a lower state insert after (looking at the date and time). In this case, the control that I want should not return the practice 349 because after the state 40 was added an inferior status (30) more recently .
I try this control selecting the practices with state 40 and veryfing if the date of the practices that are minor of 40 are major of the date of the practices that are the state 40 (the same for the time). I think that the reasoning is correct, but the control didn't work (prolly for my mistakes). The code is below:
QlikView respond that can not find ''DataPratica40'' and ''OraPratica40''.
How can I do the comparison between the fields DataTmp AND DataPratica40 and the fields OraTmp AND OraPratica40? I try this:
But the result is an empty table. I want to get all the practices that have as their last state the State 40 (For Example, I do not want the practice 349 because It have as the last state the State 30, checking the time).