Forum Discussion

masplin's avatar
masplin
Icon for Power Participant rankPower Participant
7 years ago

Allocating call time into time buckets

I have a set of data that looks like this

 

The task is to work out how many seconds of each call is in 30min time buckets from 8:00 to 19:00

so first case is just 87 in the 12:30 to 13:00 bucket (called 12:30 bucket). The idea is to workout for various logged activities how much time the staff take in each bucket to determine more effeciaint staffing/rostering. 

 

However some call spread over up to 4 time buckets.  For a call that was say starting 13:45:00 finishing 14:15:00 the result needs to be 900 in 13:30 buckets and 900 in 14:00 bucket .

 

I've read quite a few related posts but cant see how to change thme to meet this requirement. I'm sure its trivial for the much cleverer people on this forum. Thisis the start of a big new project so want to get this right and not write some horrible inefficient solution as seems there will be an elegant one out there. 

 

Thanks in advance for any advice

Mike

 

2 Replies

    • masplin's avatar
      masplin
      Icon for Power Participant rankPower Participant

      Hi

       

      Yes it works, but not quite what i was expecting as was hoping to create a measure based off a table of time buckets not 18 different columns.  This will be an issue for doing things like the average across the day as will have to be written as an average of 18 columns.  

       

      I was thinking of a table of buckets 

       

      Start    

      08:00   

      08:30   

      etc

       

      Interval=0.5

       

      Then feed these times into a calculation so if I put [Start] on the rows of a table it woudl do the calcaution as you have done.  Is it possible to tweak your solution so the VAR aren't fixed  but come from a table of values?

       

      Thanks

      Mike