
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Determining when a value changed
I have a table like the following:
Date | Shift | Unit # | Meal Break | Update Time |
01/01/2020 | Days(7-19) | 900 | Achieved | 2:10:00 PM |
01/01/2020 | Days(7-19) | 900 | Achieved | 13:02:00 AM |
01/01/2020 | Days(7-19) | 900 | Achieved | 11:05:00 AM |
01/01/2020 | Days(7-19) | 900 | Required | 7:00:00 AM |
01/01/2020 | Nights(19-7) | 900 | Achieved | 6:00:00 AM |
01/01/2020 | Nights(19-7) | 900 | Required | 11:00:00 PM |
01/01/2020 | Nights(19-7) | 900 | Required | 9:00:00 PM |
I was able to get a count if a meal break was achieved by the end of the day by using FirstSolvedOrder for the last time and using aggr for the date, shift and unit #. There are other fields that change that are causing the multiple update times that I need to keep.
I am looking to obtain the count of units that received a meal break in a certain time period (between 4hr from the start of the shift to 8hr from the start of the 12hr shift). The issue I am having is selecting the update time where the unit on that particular shift and day first received the Achieved status.
In reference to the table above I would expect to be able to count 2 achieved meal breaks but only 1 with the window(4h/8hr) as the day shift was just past 4hr into the shift and the night shift was achieved 11hr into the shift.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@JohnMcPhee wrote:I have a table like the following:
Date Shift Unit # Meal Break Update Time 01/01/2020 Days(7-19) 900 Achieved 2:10:00 PM 01/01/2020 Days(7-19) 900 Achieved 13:02:00 AM 01/01/2020 Days(7-19) 900 Achieved 11:05:00 AM 01/01/2020 Days(7-19) 900 Required 7:00:00 AM 01/01/2020 Nights(19-7) 900 Achieved 6:00:00 AM 01/01/2020 Nights(19-7) 900 Required 11:00:00 PM 01/01/2020 Nights(19-7) 900 Required 9:00:00 PM
I was able to get a count if a meal break was achieved by the end of the day by using FirstSolvedOrder for the last time and using aggr for the date, shift and unit #. There are other fields that change that are causing the multiple update times that I need to keep.
I am looking to obtain the count of units that received a meal break in a certain time period (between 4hr from the start of the shift to 8hr from the start of the 12hr shift). The issue I am having is selecting the update time where the unit on that particular shift and day first received the Achieved status tellgamestop.
In reference to the table above I would expect to be able to count 2 achieved meal breaks but only 1 with the window(4h/8hr) as the day shift was just past 4hr into the shift and the night shift was achieved 11hr into the shift.
The value is changing in time side.
