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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

How to calculate an interval time with sobreposing times

Hi, I have to summarize the total time that a machine was stopped by maintainance during a day.

In my maintainance table I have date/time begining and date/time finished for each maintanance.

The problem is that one maintainance can sobrepose another, so I can have something like this:

equipament     begin                                   end

AB                 16/05/2014 10:02:25               16/05/2014 10:30:25

AB                 16/05/2014 12:40:00               16/05/2014 12:53:00

AB                 16/05/2014 12:43:08               16/05/2014 13:00:00

My total time needs to be 28 + 13 + 7 = 48 minutes

Anyone can help me to get this liquid time please?

Best

1 Solution

Accepted Solutions
Not applicable

Attached. I think the answer should be 82 mins.

Thanks

View solution in original post

5 Replies
Not applicable

Attached with answer. Please look at the back-end script for clarity.

Thanks

AJ

SunilChauhan
Champion II
Champion II

=Interval(min(begin),Max(End),'MM')

hope this helps

Sunil Chauhan
rcandeo
Creator III
Creator III
Author

Almost there. I can have somethin like this that won´t work.

Could you help me again?

Table:

LOAD * INLINE [

    Equip, Begin, End

    A, 5/16/2014 10:02:25, 5/16/2014 10:30:25

    A, 5/16/2014 12:40:00, 5/16/2014 12:53:00

    A, 5/16/2014 12:43:08, 5/16/2014 13:00:00

    A, 5/16/2014 13:40:00, 5/16/2014 13:50:00

    A, 5/16/2014 13:45:00, 5/16/2014 13:53:00

    A, 5/16/2014 13:46:00, 5/16/2014 13:57:00

    A, 5/16/2014 14:40:00, 5/16/2014 14:55:00

    A, 5/16/2014 14:45:00, 5/16/2014 14:47:00

    A, 5/16/2014 14:48:00, 5/16/2014 14:57:00

];

Not applicable

Attached. I think the answer should be 82 mins.

Thanks

rcandeo
Creator III
Creator III
Author

Great. Thank You very very much!