Updated on

Duration.TotalHours is a Power Query M function that calculates the total hours spanned by a duration value. The function returns a decimal number representing the total hours.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


Duration.TotalHours( duration as nullable duration ) as nullable number


Duration.TotalHours returns the total number of hours (including fractional hours) spanned by the duration duration.


Find the total hours spanned by a duration value.

// Output: 124.05055555555555
Duration.TotalHours( #duration( 5, 4, 3, 2 ) )

Other functions related to Duration.TotalHours are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/duration-totalhours