Good morning Community! I'm hoping somebody can help me with my workflow. I thought I almost had it, but I'm stuck, and I don't know if I'm making it more complicated than it should be.
I have a data set of equipment downtime. Each record shows the start date and time of when the equipment went down and the end date and time of when it came back up. There's also a second end date field where nulls mean the equipment is still down right now. What I am trying to do is break down the total downtime shown in each record into a daily downtime when the downtime exceeds 1 day. To make things more complicated, everything my company does is by the shift (6 a.m. to 6 p.m. is day shift, and 6 p.m. to 6 a.m. is night shift), so instead of just tracking the daily downtime for each equipment, I have to break it down even further into the shifts of each day.
Some of the rows are really easy and the downtime starts and ends on the same day and the same shift. Some rows start and end on the same day but across two different shifts. Some start and end multiple days and shifts apart. I tried using a Generate Rows tool to generate rows according to how many shifts were in the total downtime (I took the total downtime divided by 12) but that didn't always work because you can have 7 hours total of downtime but across two different shifts depending on the time the downtime actually started but my formula will only return 1 shift. I continued working from that formula though and was going to fix the 'exceptions to the rule' at the end, but now my first Generate Rows tool is not looping the expression when I haven't made any changes to it since the last time I tried running it and it was working. So now I figured I better ask for help because I'm starting to feel defeated.
If anybody can help me, it would be greatly appreciated.