Hi @lparkerMDVIP ,
Could you please share a bit more about your scenario?
Do you want to add a Row Number Index into your Gallery?
Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following workaround:
Set the OnStart property of the App to following:
Clear(RecordsCollection);
ForAll(
AddColumns(
GroupBy('SP Data Source', "Points_x0020_Given_x0020_To", "ByEmployee"),
"Points Given",
Sum(ByEmployee, PointsGiven)
),
Collect(
RecordsCollection,
{
RowIndex: CountRows(RecordsCollection) + 1,
PointsGivenTo: 'Points Given To',
PointsGiven: 'Points Given',
EmployeeTable: ByEmployee
}
)
)
Set the Items property of the Gallery to following:
FirstN(
SortByColumns(RecordsCollection, "PointsGiven", Descending),
10
)
Then re-load your app (fire the OnStart property of App), check if the issue is solved.
Within your Gallery, you could reference the Row Index value through the following formula:
ThisItem.RowIndex
More details about the ForAll function, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall
Best regards,