let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"As Of Date", type date}, {"version", Int64.Type}, {"rundate", type date}, {"entity", type text}, {"leaf_level_id", type text}, {"element_id", type text}, {"record_type", type text}, {"source_from", type text}, {"cell_name", type text}, {"Amount", type number}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"As Of Date", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"As Of Date", type text}}, "en-US")[#"As Of Date"]), "As Of Date", "Amount", List.Sum),
#"Removed Columns" = Table.RemoveColumns(#"Pivoted Column",{"version", "rundate"}),
#"Grouped Rows" = Table.Group(#"Removed Columns", {"record_type", "entity", "leaf_level_id", "element_id", "source_from", "cell_name"}, {{"Current Qtr", each List.Sum([#"3/31/2020"]), type nullable number}, {"Last Qtr", each List.Sum([#"9/30/2019"]), type nullable number}})
in
#"Grouped Rows"