Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
For distinct ID I am trying to find out what is the time difference between the log A and log B (there are sometimes different log types in between, but they don't matter)
so I was thinking to insert such a query:
if(Log = 60, Timestamp) - if(Log = 70, Timestamp) as TimeLogsDiff
but it doesn't work.
Does anyone has an idea?
Hi Barbara,
since your Log numbers and dates appear in different rows of your table, your formula can never produce results, because it can't be performed in a single row. You need to transform your table in such as way that both Log Numbers and both Dates are in the same row. For example:
LogSum:
LOAD
ID,
TimeStamp60 - TimeStamp70 as TimeLogsDiff
;
LOAD
ID,
min(IF(Log=60, Timestamp) as TimeStamp60,
min(IF(Log = 70, Timestamp) as TimeStamp70
resident
Lolg
group by
ID
;
Cheers,
Oleg Troyansky
Upgrade your QlikView and Qlik Sense skills at the Masters Summit for Qlik - coming to Stockholm on April 1st!