You could use Power Query to transform your data and calculate the Outcome per row. Format your source data as a table, then use:
let
ModifyPartition = (MyPartition) =>
let
MinRank = List.Min(MyPartition[Rank]),
MasterLabel = Text.Combine({if Table.RowCount(Table.SelectRows(MyPartition, each ([Rank] = MinRank))) > 1 then "Joint" else null,"Master"}," "),
AddOutcome = Table.AddColumn(MyPartition, "Outcome", each if [Rank] = MinRank then MasterLabel else "Non Master", type text)
in
AddOutcome,
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Channel", type text}, {"GROUP_ID", Int64.Type}, {"Rank", Int64.Type}}),
#"Partitioned Groups" = Table.Group(#"Changed Type", {"GROUP_ID"}, {{"Data", each ModifyPartition(_), type table}}),
#"Combined Partitions" = Table.Combine(#"Partitioned Groups"[Data])
in
#"Combined Partitions"
There are multiple ways you can format your output, but I'd suggest loading to the data model, then using pivot tables.
See attached worked example.
Bookmarks