Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacquesb
Contributor
Contributor

Calculate time interval between start time and finish time, for a specific item, for a specific day.

I am new to QlikView and have a question?

We are monitoring the downtime, for machines operating in a mine. The downtime on the machines is mainly due to Breakdowns and Services.

We calculate the downtimes based on the previous day's performance and also need to calculate the downtime per machine for a specified time period say for example the last two months, or any time interval selected.

The Machines operate over 2 shifts, namely Dayshift and Night Shift. It often occurs that a machine has a breakdown in the one shift, that spans into the new shift for example Date Actual Start is 03 June 2023 4:15 pm and Date Actual Finish is 04 June 2023 01:00 AM.

I want to use a calculated dimension in a straight table chart in QlikView, that calculate the difference between the Start and end time, for a specific day how do I do this?

and also 

I want to be able to Aggregate and sum the downtime in total and per Downtime Code(Service or Breakdown) for a specific machine over a specified time period.

Below is an example of the data in excel format.

DATE ASSET TYPE Asset  DESCRIPTION TOTAL DURATION Morning Shift Duration  Night Shift Duration  EOS Time  M/S Start Time  Artisan Start Time  M/S End Time  N/S Start Time  Artisan Start Time  N/S End time 
2-Jun DRILL RIG BM01 Right Boom Shank Broken 0:15 0:15 0:00 0:00 12:00 12:00 12:15 0:00 0:00 0:00
2-Jun DRILL RIG BM01 Right Boom Swing Cylinder Hose Damaged  0:50 0:50 0:00 0:00 12:30 12:30 13:20 0:00 0:00 0:00
2-Jun DRILL RIG BM02 Rear Right tyre Damaged  2:30 2:30 0:00 0:00 10:30 0:00 13:00 0:00 0:00 0:00

 

 

Labels (3)
1 Reply
rubenmarin

Hi, I can't see the excel example but usually the best way to do this is to work in script to calculate or flag the working time, this has differnt ways to do this because data can be received in many different ways, the easiest is to have one row with start and end time, so you can simple do a substraction: [DateTimeEnd]-[DataTimeStart] as IntervalTime.

In the script you can transform the data to go the that simple operation, maybe splitting time in shifts, adding a field to identify the activity on that interval (productive, repair, cleaning, failure...). Having all this prepared in script the creation of the table is a lot easier, just add the dimensions and a sum of IntervalTime.