Forum Discussion

Maximus's avatar
Maximus
Frequent Visitor
3 years ago
Solved

Calculation Overall Run time with overlapping time intervals

Hi,   Need a help for calculating sum of the job elapsed time, here the data between the jobs are overlapped(means few jobs started in parallel).  Please help. Here is the sample data.   From J...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Maximus,

    You can try to use the following measure formula to get the max duration from current row context:

    formula =
    VAR summary =
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            [JOB_ID],
            [PRCS_START_TIME],
            [PRCS_END_TIME],
            "Diff", DATEDIFF ( 'Table'[PRCS_START_TIME], 'Table'[PRCS_END_TIME], SECOND )
        )
    RETURN
        MAXX ( summary, [Diff] )

    Regards,

    Xiaoxin Sheng