I'm trying to find a relationship between uses and part lifetime. This is a part that runs constantly when in use. I need a running total that resets when the part is replaced. In my case, I have the first four columns, I want to know how to create the "Jobs Part has Done" column that resets when a Repair event is detected.
| DateTime Started | DateTime Ended | Jobs | Event | Jobs Part has Done |
| 1/1/2019 8:00 AM | 1/1/2019 9:00 AM | 2 | Work | 2 |
| 1/1/2019 10:00 AM | 1/1/2019 12:00 PM | 5 | Work | 7 |
| 1/1/2019 3:00 PM | 1/1/2019 6:00 PM | 5 | Work | 12 |
1/1/2019 6:00 PM | 1/1/2019 7:00 PM | | Replacement | 0 |
| 1/1/2019 8:00 PM | 1/1/2019 9:00 PM | 2 | Work | 2 |
1/1/2019 10:00 PM | 1/1/2019 11:00 PM | 2 | Work | 4 |