QuestionQ43

VerifiedPrepare data

You have a query in Microsoft Power BI Desktop that contains two columns named Order_Date and Shipping_Date.

You need to create a column that will calculate the number of days between Order_Date and Shipping_Date for each row.

Which Power Query function should you use?

Explanation

In Power Query, Duration.Days() extracts the number of days from a duration value. To calculate days between two date columns, subtract them (producing a duration) then pass the result to Duration.Days(). The pattern is: Duration.Days([Shipping_Date] - [Order_Date]). Other functions handle date arithmetic or system time but do not extract day counts from durations.

Community Discussion

No comments yet. Be the first to start the discussion!