Forum Discussion

Forecaster's avatar
Forecaster
Regular Visitor
4 years ago
Solved

Average Time Not Showing Correctly

Hi everyone    I have a duration column which shows seconds and is a whole number.   I can get the average duration by using the formula:   avg = AVERAGE(Query1[Duration])     this gives m...
  • Forecaster's avatar
    4 years ago

    I managed to solve this by doing the following:

    HHMMSS = 
    INT(Query1[avg] / 3600) & ":" &
    RIGHT("0" & INT(([avg] - INT([avg] / 3600) * 3600) / 60), 2) & ":" &
    RIGHT("0" & MOD([avg], 3600), 2)