let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Jurisdiction", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
#"Merged Queries" = Table.FuzzyNestedJoin(#"Added Index", {"Jurisdiction"}, #"Added Index", {"Jurisdiction"}, "Added Index", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, Threshold=0.8]),
#"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"Jurisdiction"}),
#"Expanded Added Index" = Table.ExpandTableColumn(#"Removed Columns", "Added Index", {"Jurisdiction", "Index"}, {"Jurisdiction", "Index.1"}),
#"Removed Duplicates" = Table.Distinct(#"Expanded Added Index", {"Index.1"}),
#"Grouped Rows" = Table.Group(#"Removed Duplicates", {"Index"}, {{"Count", each Table.RowCount(_), Int64.Type}, {"All", each _, type table [Index=number, Jurisdiction=nullable text, Index.1=nullable number]}}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Jurisdiction", "Index.1"}, {"Jurisdiction", "Index.1"})
in
#"Expanded All"
Bookmarks