Trusted Members
Moderators
November 1, 2018
February 8, 2020
Thank you for helping.
The group number does not matter as long as each two are paired together. And, I keep the blank row to show separation from each group. This is a match schedule and the final display will be 20 individual matchups so I keep the blank row between each match for clarity.
Trusted Members
Moderators
November 1, 2018
You could do something simple like this then:
let
Source = Excel.CurrentWorkbook(){[Name="Matchups"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Team", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1),
#"Added Custom" = Table.AddColumn(#"Added Index", "Grouper", each if [Team] = null then [Index] else null),
#"Filled Up" = Table.FillUp(#"Added Custom",{"Grouper"}),
#"Removed Columns" = Table.RemoveColumns(#"Filled Up",{"Index"}),
#"Added Custom1" = Table.AddColumn(#"Removed Columns", "GroupNumber", each if [Team] = null then null else [Grouper]),
#"Removed Columns1" = Table.RemoveColumns(#"Added Custom1",{"Grouper"})
in
#"Removed Columns1"
1 Guest(s)