Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating time between different id:s

Hi!

I need some help to calculate this following example:

idstart_time1stop_time2
112014-01-13  08:05:002014-01-13  12:08:00
122014-01-13 12:55:002014-01-13  17:00:00
132014-01-14 08:00:002014-01-14  16:00:00
142014-01-15  07:45:002014-01-15  14:40:00
152014-01-16  08:15:002014-01-16  13:15:00
162014-01-16  14:30:002014-01-16  20:30:00

I need to calculate the difference between stop_time2 and start_time1 when same date occurs for two different id:s. In the table there are two days with more then one id, 2014-01-13 and 2014-01-16. What I´m looking for is the time (hh:mm:ss) between id 11 and 12 (stop_time2-start_time1) and as a second post the time between id 15 and id 16.

Regards

Peter

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi

have a look at the attach example

it find the start date for each event

than for each dtae it calculates the min start and max stop

this way you handle as many event as you want

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

have a look at the attach example

it find the start date for each event

than for each dtae it calculates the min start and max stop

this way you handle as many event as you want

Not applicable
Author

Thanks Liron for a quick and correct answer!