let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
AddIndex = Table.AddIndexColumn(Source, "Index", 1, 1),
SetAsDateTime = Table.TransformColumnTypes(AddIndex,{{"Start Time", type datetime}, {"End Time", type datetime}}),
SubtractTime = Table.AddColumn(SetAsDateTime, "Subtraction", each [End Time] - [Start Time], type duration),
CalculateDurationTotalHours = Table.TransformColumns(SubtractTime,{{"Subtraction", Duration.TotalHours, type number}}),
RenameAsTotalHours = Table.RenameColumns(CalculateDurationTotalHours,{{"Subtraction", "Total Hours"}}),
GetListOfDateTimes = Table.AddColumn(RenameAsTotalHours, "Custom", each List.DateTimes([Start Time],if [Total Hours]<24 then [Total Hours]+1 else [Total Hours],#duration(0, 1, 0, 0))),
ExtractListToRows = Table.ExpandListColumn(GetListOfDateTimes, "Custom"),
ExtracteOnlyTime = Table.TransformColumns(ExtractListToRows,{{"Custom", DateTime.Time, type time}}),
SortAscending = Table.Sort(ExtracteOnlyTime,{{"Custom", Order.Ascending}}),
AddBoolean1 = Table.AddColumn(SortAscending, "Custom.1", each 1),
PivotTimes = Table.Pivot(Table.TransformColumnTypes(AddBoolean1, {{"Custom", type text}}, "nl-BE"), List.Distinct(Table.TransformColumnTypes(AddBoolean1, {{"Custom", type text}}, "nl-BE")[Custom]), "Custom", "Custom.1"),
SortOnIndex = Table.Sort(PivotTimes,{{"Index", Order.Ascending}}),
RemoveRedundantColumns = Table.RemoveColumns(SortOnIndex,{"Start Time", "End Time", "Index"})
in
RemoveRedundantColumns