This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
Please assist me to crack this one: a logic to calculate the duration/interval time between first and the previous time in one field. The below is how my data looks like for each session.
LOAD * INLINE [
ID,Date and Time
May be try this
SET TimestampFormat='MM/DD/YYYY h:mm:ss';
Interval(If(ID = Previous(ID), [Date and Time] - Previous([Date and Time]), 0), 'D h:mm:ss') as Difference
Order By ID, [Date and Time];
DROP Table Table;
View solution in original post
Thank you Sunny
That work perfectly!! I re did with the peek() and I still got the same results . See the below:
SET TimestampFormat='DD/MM/YYYY h:mm:ss';
Interval(DT - if(Peek(ID)=ID,Peek(DT),DT)) as Interval
Order By ID,DT;
DROP Table table1;