let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Transposed Table" = Table.Transpose(Source),
#"Changed Type" = Table.TransformColumnTypes(#"Transposed Table",{{"Column1", type date}}),
#"Transposed Table1" = Table.Transpose(#"Changed Type"),
#"Replaced Value" = Table.ReplaceValue(#"Transposed Table1",null,"a",Replacer.ReplaceValue,{"Column1"}),
#"Added Custom" = Table.AddColumn(#"Replaced Value", "Custom", each if Text.Length([Column1])>3 then [Column1] else null),
#"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"}),
#"Reordered Columns" = Table.ReorderColumns(#"Filled Down",{"Custom", "Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column35", "Column36", "Column37", "Column38", "Column39", "Column40"}),
#"Replaced Value1" = Table.ReplaceValue(#"Reordered Columns","a",null,Replacer.ReplaceValue,{"Column1"}),
#"Filtered Rows" = Table.SelectRows(#"Replaced Value1", each ([Column2] <> null)),
#"Promoted Headers" = Table.PromoteHeaders(#"Filtered Rows", [PromoteAllScalars=true]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Column1", "Column2"}, "Attribute", "Value"),
#"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"Column1", "Column2", "Attribute"}, {{"Totals", each List.Sum([Value]), type number}})
in
#"Grouped Rows"