Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
John-SSI
Creator
Creator

Interval and Previous over dates

Hi, when i added more dates into my data i see that expression  calculate the time between day1 (last transaction) and day 2 (first transaction)

Se picture:

JohnSSI_0-1758099834703.png

Expression:

Output:
LOAD*,
If(UserName = Previous(UserName), Time(Interval(Timestamp#(Tid, 'hh:mm:ss') - (Timestamp#(Previous(Tid), 'hh:mm:ss')), 'hh mm ss'), null())) AS Duration3

Resident AS
ORDER BY UserName, Date,Tid;
DROP Table AS;

How can i aviod that so each day starting (the first transaction) is 00:00:00

Labels (2)
1 Solution

Accepted Solutions
robert_mika
MVP
MVP

Did you try to add IF statement to your expression?

View solution in original post

3 Replies
robert_mika
MVP
MVP

Did you try to add IF statement to your expression?

John-SSI
Creator
Creator
Author

Hi Robert, 

Do you mean something like this?
if(Duration <0,00:00:00, Duration )

🙂

John-SSI
Creator
Creator
Author

Btw, it worked 😄