Updated on

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

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


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


Duration.TotalDays returns the total number of days (including fractional days) spanned by the duration duration.


Find the total days spanned by a duration value.

// Output: 5.1687731481481478
Duration.TotalDays( #duration( 5, 4, 3, 2 ) )

Other functions related to Duration.TotalDays are:

BI Gorilla Blog

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