Hello, I'm trying to create a leaderboard whereby the scores are grouped by team name (TeamAliasText) and summed by points. I am able to get the gallery to group and sum. But I cannot get the ranking to work 😞
This is what I have under items for the gallery,
SortByColumns(
AddColumns(
GroupBy('Game Scores',"TeamAliasText","GroupedItems"),
"Sum of Value",Sum(GroupedItems,Points)
),
"Sum of Value",
SortOrder.Descending
)
Current result:

Hoping to have, ranking on the left

Ungroup(
ForAll(
Sequence(CountRows('Game Scores')),
{
myRecord: Table(
Last(
FirstN( Sort('Game Scores', Points, SortOrder.Descending),
Value
)
)
),
RowNumber: Value
}
),
"myRecord"
)
I can't seem to get both of these working together.