Skip to main content
Announcements
April 9th: The AI Roadmap: 6 Landmarks for AI-ready Data and Analytics: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnMcPhee
Contributor II

Determining when a value changed

I have a table like the following: 

DateShiftUnit #Meal BreakUpdate Time
01/01/2020Days(7-19)900Achieved2:10:00 PM
01/01/2020Days(7-19)900Achieved13:02:00 AM
01/01/2020Days(7-19)900Achieved11:05:00 AM
01/01/2020Days(7-19)900Required7:00:00 AM
01/01/2020Nights(19-7)900Achieved6:00:00 AM
01/01/2020Nights(19-7)900Required11:00:00 PM
01/01/2020Nights(19-7)900Required9: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. 

1 Reply
Hallinan969
Contributor


@JohnMcPhee wrote:

I have a table like the following: 

DateShiftUnit #Meal BreakUpdate Time
01/01/2020Days(7-19)900Achieved2:10:00 PM
01/01/2020Days(7-19)900Achieved13:02:00 AM
01/01/2020Days(7-19)900Achieved11:05:00 AM
01/01/2020Days(7-19)900Required7:00:00 AM
01/01/2020Nights(19-7)900Achieved6:00:00 AM
01/01/2020Nights(19-7)900Required11:00:00 PM
01/01/2020Nights(19-7)900Required9: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.