Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

calculate processing time based on interruptions and restarts

Hi,
I would like to use the power query to calculate the processing time based on interruptions and restarts.
An employee can open (STATUS=STARTED) and process a ticket several times. Once they have finished, they can close it (STATUS=CLOSED). How can I calculate the average of all these time intervals for the same ticket number?
Each time the employee suspends the activity, the ticket will have a status="INTERRUPT" and STATUS="RESUME" when it is resumed.

Tnaksin advance !!

2 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

     

    Can you provide some sample data and expected result in table format? 

     

    If your table has start time and end time of every interval, you can add a column to calculate the duration of every interval first. Then you can use Group by feature to get the average of intervals per ticket number. Group by ticket number column and calculate the average of interval duration in a new column. 

     

    If you can provide some sample data, we can help provide a detailed solution. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi !

    Service_idwork_log_typestart_timestampend_timestampCorrect_Timestamp    
    8912871SERVICE_STARTED25.04.2023 14:10:4925.04.2023 14:15:10start_timestamp25.04.2023 14:10:49a  
    8912871SERVICE_INTERRUPT25.04.2023 14:15:1025.04.2023 14:15:10end_timestamp25.04.2023 14:15:10bb-a00:04:21
    8912871SERVICE_RESUME25.04.2023 14:15:1825.04.2023 14:18:42start_timestamp25.04.2023 14:15:18c  
    8912871SERVICE_INTERRUPT25.04.2023 14:18:4225.04.2023 14:18:42end_timestamp25.04.2023 14:18:42dd-c00:03:24
    8912871SERVICE_RESUME25.04.2023 14:19:4625.04.2023 14:21:16start_timestamp25.04.2023 14:19:46e  
    8912871SERVICE_INTERRUPT25.04.2023 14:21:1625.04.2023 14:21:16end_timestamp25.04.2023 14:21:16ff-e00:01:30
    8912871SERVICE_RESUME25.04.2023 16:26:3825.04.2023 16:32:57start_timestamp25.04.2023 16:26:38g  
    8912871SERVICE_COMPLETED25.04.2023 16:33:3225.04.2023 16:33:33end_timestamp25.04.2023 16:33:33hh-g00:06:55
           Durée correcte00:16:10

    thanks for your help 🙂