Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Working hours considering overlap times

Good morning everyone!

 

I was wondering if I could get some help with the following problem. For a specific task inside our site, I am getting the following information directly from the WMS:

- USER ID

- Task ID

- Start Time

- End Time

- Quantity of SKU's processed

 

From that information, I am trying to get the working hours and productivity for each user. The problem is that due to the client needs, some colaborators have to perform tasks in bewteen. For example, let's consider the following:

- I started TASK1 at 10:30 with 10 SKU's

- I started TASK2 at 10:43 with 2 SKU's

- I finished TASK2 at 10:55

- I finished TASK1 at 11:15

 

I would like to consider:

- If there is an overlap, consider the earliest start time (10:30)

- If there is an overlap, consider the latest end time (11:15)

- Therefore the working hours would be 45 minutes

- Consider the total SKU's processed (12 lines)

- Productivity: 12/45 = 16 sku's per hour

 

I also have to consider scenarios where TASK2 would start after TASK1 and end also after TASK1 aswell:

- TASK1 START TIME: 10 AM

- TASK 2 START TIME: 10:30 AM

- TASK 1 END TIME 10:40 AM

- TASK 2 END TIME: 10:45

 

Another possible solution that I was thinking about was consider the total SKU's processed by one user on a shift, and afterwards, consider the total working hours and then substract the overlaping times. I would really appreciate any help with this scenarios.

 

Best regards, Diego

8 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous

     

    I'll propose a pretty simple solution to start with. It will probably need refinement depending on how you want to deal with data for several days. This would probably work at the day level:

     

    1. Set [USER ID] on the rows of a matrix visual. Date (day level) on the columns

    2. Set a measure like this in values of the matrix:

     

    Productivity =
    DIVIDE (
        SUM ( Table1[NumSKUs] );
        ( MAX ( Table1[End Time] ) - MIN ( Table[Start Time] ) ) * 24
    )

    This should give you productivity in SKUs per hour. It assumes the time columns are in Date/Time format.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey AIB,

       

      First of all thank you for taking the time for reading and helping me with this! 

       

      Regarding the data, for example, my shift is from 8:00 AM until 17:30 PM, durning that time I am supposed to be working on a specific task, but due to activities related to the work, helping a coworker, breaks, being on the phone, going for lunch, etc. I don't spend the whole shift at those specific tasks that I'm suppose to do.

       

      Therefore I would like to calculate the amount of time that I am actually doing that specific task, that is why I am trying to calculate the duration of each activity (End - Start time) and then sum all the durations from one shift. And based on that time and considering the amount of SKU's processed, determine:

      - The "real" working hours

      - The productivity (SKU's / Working hours) 

       

      I hope that clarifies the problem that I'm facing.

       

      Once again thank you for your help!

      • AlB's avatar
        AlB
        Icon for Community Champion rankCommunity Champion

        Hi Anonymous

        Can you share the pbix? It'd be easier to help you with that