Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to check the average time for each location, The problem is that we have only trackdate and need to find the difference between tracktime for first record to second record. we need to find the difference between first row date to second row date. The last row is not required as there is no possibility of finding the average time. Apart from this we need to change the number format to date. In qlikview we can change the format but i am trying to find this through Query. and then i have to add this query to existing script.
| 12345 | 2662089 | Zua | 20090624 | 9111937 | suresh |
| 12345 | 2671220 | Gas | 20090710 | 9082237 | mahesh |
| 12345 | 2694593 | Gfil | 20090826 | 9151604 | sekar |
Hi,
it's counter-intuitive, but you want to use previous()! The trick is to
use it on every field. i.e. something like this:
LOAD
previous(field1) as field1,
previous(field2) as field2,
// (etc)
previous(fieldN) as fieldN,
datetime-previous(datetime) AS Duration
Resident YourInputDataTable;
Angus.
using "order by" descending, the "previous" behaviour is like a "next" (that does not exists....)
I think it's a little boring using previous for each field !
Roberto