Duration.Days is a Power Query M function that extracts the days portion of a duration value. The function returns an integer representing the number of days.

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


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


Returns the days portion of duration.


Extract the number of days between two dates.

// Output: 7
Duration.Days( #date( 2022, 3, 4 ) - #date( 2022, 2, 25 ) )

Learn more about Duration.Days in the following articles:

Other functions related to Duration.Days are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/duration-days
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.