let
Source = Excel.CurrentWorkbook(){[Name="Hours"]}[Content],
data.Typed = Table.TransformColumnTypes(Source,{{"SAT", Int64.Type}, {"SUN", Int64.Type}, {"MON", Int64.Type}, {"TUE", type any}, {"WED", type any}, {"THU", type any}, {"FRI", Int64.Type}}),
indexcol.Add = Table.AddIndexColumn(data.Typed, "Index", 0, 1),
indexCol.Unpivot = Table.UnpivotOtherColumns(indexcol.Add, {"Index"}, "Attribute", "Value"),
notesCol.Add = Table.AddColumn(indexCol.Unpivot, "Daily Notes", each if Text.StartsWith([Value], "OFF") then "(" & [Attribute] & ") " & [Value] else null),
errors.Replace = Table.ReplaceErrorValues(notesCol.Add, {{"Daily Notes", null}}),
oldcols.Remove = Table.RemoveColumns(errors.Replace,{"Attribute", "Value"}),
index.GroupBy = Table.Group(oldcols.Remove, {"Index"}, {{"AllData", each _, type table [Index=number, Custom=text]}}),
notesTable.ToList = Table.AddColumn(index.GroupBy, "Daily Notes", each [AllData][Daily Notes]),
listValues.Extract = Table.TransformColumns(notesTable.ToList, {"Daily Notes", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
notesTableCol.Remove = Table.RemoveColumns(listValues.Extract,{"AllData"}),
notes.MergeBack = Table.NestedJoin(notesTableCol.Remove, {"Index"}, indexCol.Unpivot, {"Index"}, "Removed Columns1", JoinKind.LeftOuter),
mergedData.Expand = Table.ExpandTableColumn(notes.MergeBack, "Removed Columns1", {"Attribute", "Value"}, {"Attribute", "Value"}),
indexCol.RePivot = Table.Pivot(mergedData.Expand, List.Distinct(mergedData.Expand[Attribute]), "Attribute", "Value"),
notesCol.MoveToEnd = Table.ReorderColumns(indexCol.RePivot,{"Index", "SAT", "SUN", "MON", "TUE", "WED", "THU", "FRI", "Daily Notes"}),
indexCol.Remove = Table.RemoveColumns(notesCol.MoveToEnd,{"Index"})
in
indexCol.Remove