marcorivera8
marcorivera8

Reputation: 257

How to create datediff calculation in Power Query

Is there a way I can use Datediff in Power Query as a calculated column?

This is the calculation I would like to do:

datediff("minute",[Login Time],[Logout Time])

The login time and logout time columns look like this:

enter image description here

I would greatly appreciate your suggestions. Thanks.

Upvotes: 0

Views: 2225

Answers (1)

Spevy
Spevy

Reputation: 1325

You can use the Duration functions. First create the direction:

Duration.From([EndDate] - [StartDate])

Then you can use Duration.TotalMinutes(Durationvalue)

Upvotes: 1

Related Questions