K
Karl Piper
Greetings,
Here is a whale of a problem for the experts:
I have timed data for loading and unloading product in a warehouse. For
example, StartDate, StartTime when loading begins, then StopDate, StopTime
when the loading ends. So I now have a starting date and time and ending
date and time (since we load 24 hours it could span days). I then calculate
the number of minutes used loading by subtracting the StopTime from the
StartTime AND I calculate the amount of product loaded by Subtracting the
weight of product BEFORE being loaded that's in the warehouse from the
weight of produce left in the warehouse at the END of loading. OK so far.
The problem to solve is this:
I need a running average of amount of product loaded over 5 hr windows
beginning each day at 12:00 midnight. IOW, at 12:00 AM I want to look BACK
over the past 5 hours and 1) see if any product has been loaded and 2) if it
has, what was the average amount loaded. I need to do this for entire 24
hours periods within certain dates. So I may want to see what my running 5
hour average loading amount was over a 4 day period. The final output may
look something like:
TIME AVG PRODUCT LOADED
7:00 PM - 12:00 AM 505
8:00 PM - 1:00 AM 234
9:00 PM - 2:00 AM 765
10:00 PM - 3:00 AM 0
But the data can be like StartTime=7:45 PM, EndTime=9:30 PM and so on with
many different loadings within a 5 hour period.
Data fields are StartDate, StartTime, EndDate, EndTime, BegWT, EndWT. Again
I'm ok with calculating the amount of time and product for each loading
session, but there could be time spans with NO DATA. So my first question
is how to I show an entire 24 hour period if there is no data to fill the
entire period. Question 2 is how do I look back over the five hour periods
to calculate the running average?
Thanks in advance and sorry if the description is too long.
Karl
Here is a whale of a problem for the experts:
I have timed data for loading and unloading product in a warehouse. For
example, StartDate, StartTime when loading begins, then StopDate, StopTime
when the loading ends. So I now have a starting date and time and ending
date and time (since we load 24 hours it could span days). I then calculate
the number of minutes used loading by subtracting the StopTime from the
StartTime AND I calculate the amount of product loaded by Subtracting the
weight of product BEFORE being loaded that's in the warehouse from the
weight of produce left in the warehouse at the END of loading. OK so far.
The problem to solve is this:
I need a running average of amount of product loaded over 5 hr windows
beginning each day at 12:00 midnight. IOW, at 12:00 AM I want to look BACK
over the past 5 hours and 1) see if any product has been loaded and 2) if it
has, what was the average amount loaded. I need to do this for entire 24
hours periods within certain dates. So I may want to see what my running 5
hour average loading amount was over a 4 day period. The final output may
look something like:
TIME AVG PRODUCT LOADED
7:00 PM - 12:00 AM 505
8:00 PM - 1:00 AM 234
9:00 PM - 2:00 AM 765
10:00 PM - 3:00 AM 0
But the data can be like StartTime=7:45 PM, EndTime=9:30 PM and so on with
many different loadings within a 5 hour period.
Data fields are StartDate, StartTime, EndDate, EndTime, BegWT, EndWT. Again
I'm ok with calculating the amount of time and product for each loading
session, but there could be time spans with NO DATA. So my first question
is how to I show an entire 24 hour period if there is no data to fill the
entire period. Question 2 is how do I look back over the five hour periods
to calculate the running average?
Thanks in advance and sorry if the description is too long.
Karl