Forum Discussion

Thiago's avatar
Thiago
Regular Visitor
10 years ago
Solved

Sum hours

Hello everyone!   I need to get the sum of hours in a given field and I know that the total sum that exceeds 24 hours .   I've tried using the code below , but it didn't work: Column = (LEFT([H...
  • AlexChen's avatar
    10 years ago

    Hi, 

     

    For example, you have a table like below, the “time” column is date type:

     

     

    You can create a measure :

     

    Measure = sumx('table', hour('table'[time])) + TRUNC(sumx('table', MINUTE('table'[time]))/60)  & ":" & mod(sumx('table', MINUTE('table'[time])), 60) & ":00"

     

    The result is what you want: