Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Below is the data in the table.
Name | Date | Time | Code | Event |
---|---|---|---|---|
JON | 8/8/2011 | 2.50.00 PM | RRR | Connect |
JON | 8/8/2011 | 2.50.00 PM | XXX | Not Active |
JON | 8/8/2011 | 2.51.00 PM | BBB | Active |
JON | 8/8/2011 | 2.53.00 PM | ZZZ | Not Active |
JON | 8/8/2011 | 2.53.20 PM | CCC | Not Active |
JON | 8/8/2011 | 2.53.40 PM | DDD | Not Active |
JON | 8/8/2011 | 2.55.00 PM | DDD | Disconnect |
JON | 8/8/2011 | 3.10.00 PM | RRR | Connect |
JON | 8/8/2011 | 3.11.00 PM | XXX | Not Active |
JON | 8/8/2011 | 3.15:00 PM | DDD | Disconnect |
Try to find out for how long Jon was in 'Not active' state group by code.Final result would be
Code | Duration |
---|---|
XXX | 00:05:00 |
ZZZ | 00:02:00 |
In my script, I have to find out where the event is 'not active' and capture the corresponding time as start time and then need to go to the next record to find out what the event value is,if the event is other than 'Not active' then only I have to pick the corresponding time as end time.if the next record has event as 'not active' have to check next records till the value is either active or disconnect.Finally have to substract start time from end time to know how long the person is in 'not active' state.For final calculation need to do a group by on code.
Can any one know how to go to next record in qlikview? Any idea how to do this in script?
thanks.
please try out this
peek(Time,-1,'Tablename')meme
hope
may help u