Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Split one raw in several rows based on a condition

$
0
0

Hi,

 

I need oprepare charts to evaluate the up time and down time of the machine.

 

The operator has a tablet and logs the type of activity.

 

The data looks like this:

 

Activity_Type_AllActivity_Start_Date&TimeActivity_End_Date&TimeActivity_Duration_HoursDecimalFormat
Productive05/09/2016 06:2905/09/2016 06:300.02
Unproductive05/09/2016 06:3005/09/2016 09:002.5
Productive05/09/2016 09:0005/09/2016 16:437.72
Unproductive05/09/2016 16:4305/09/2016 17:511.13
Productive05/09/2016 17:5105/09/2016 17:590.13
Productive05/09/2016 17:5905/09/2016 21:483.82
Unproductive05/09/2016 21:4805/09/2016 21:550.12
Unproductive05/09/2016 21:5506/09/2016 06:328.62

 

The shifts are as follows:

 

 HourMinute
Shift 1630
Shift 21430
Shift 32230

 

To be able to make charts that evaluate Shifts and days I would need to split the activity when going from one shift to the other or when it passes midnight.

 

 So I would need to repalce row 3:

Productive05/09/2016 09:0005/09/2016 16:437.72

 

with the following two rows:

 

Productive05/09/2016 09:0005/09/2016 14:305.5
Productive05/09/2016 14:3005/09/2016 16:432.22

 

The activity that is happening at midnight, should also split.

 

Thank you,

Nandor


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>