Forum Discussion

walnei's avatar
walnei
Helper III
8 years ago
Solved

AVERAGE TIME

Could you help me, I would like to measure the time spent by pilots between the start time and the end time, my base is print 1.

 

I tried using Max and Min for date but I could not solve it. I need a solution according to print 2. Can you help me?

  • Hi walnei,

     

    Add the following measure to your model:

    Time Med =
    VAR Star_Time =
        CALCULATE ( MIN ( Table1[Time] ) )
    VAR End_time =
        CALCULATE ( MAX ( Table1[Time] ) )
    RETURN
        FORMAT ( End_time - Star_Time; "hh:mm:ss" )

    Final result below:

     

     

    Regards,

    MFelix

1 Reply

  • Hi walnei,

     

    Add the following measure to your model:

    Time Med =
    VAR Star_Time =
        CALCULATE ( MIN ( Table1[Time] ) )
    VAR End_time =
        CALCULATE ( MAX ( Table1[Time] ) )
    RETURN
        FORMAT ( End_time - Star_Time; "hh:mm:ss" )

    Final result below:

     

     

    Regards,

    MFelix