PDA

View Full Version : PQ - Total hours in decimal format



sandy666
05-09-2020, 10:15 PM
Total hours in decimal format


Arrival timeExit timeHours


24/03/2020 21:15
25/03/2020 04:14
6.97


23/03/2020 07:00
23/03/2020 09:00
2


23/02/2020 07:00
25/03/2020 04:14
741.23



let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
HoursDec = Table.AddColumn(Source, "Hours", each Number.Round(Duration.TotalHours([Exit time]-[Arrival time]),2)),
TSC = Table.SelectColumns(HoursDec,{"Hours"})
in
TSC