Issues of Ranks in Leaderboard

Hello everyone,
I wanted to display rank system, As you can see in the screenshot, after 1st rank it should be 2nd rank but it is showing 3rd rank, it is because I have used, find element index column, can anyone help to display sequential rank system. like 1,2,3

Screenshot 2023-01-23 111339-glide

@Darren_Murphy I followed this video itself, but I wanted to display the ranks sequentially, like, when 2 members have got 1st rank , the next person should have 2nd rank but it is 3rd rank in my case, could you please help me with that.

So in your example, how would you decide who is 1st and who is 2nd?

Sorry, ignore that. I misread.

Okay, so just so I’m clear…

Imagine you have:

  • 1 person with 10 points
  • 100 people all with 9 points
  • 1 person with 8 points

So the person with 8 points should be ranked 3rd, even though there are 101 others ahead of him?

Yes, that’s how I want

Okay, so off the top of my head, this is what I would do:

  • Create a helper table and add enough rows to cover the maximum number of placings
  • Number the rows from 0 to N
  • Add a lookup column and target it add your Points column. This will give you an array of all the points scores.
  • Use the Unique Elements plugin to create a second array from the lookup that contains only the unique points totals.
  • Sort the unique array using the Array Sort plugin
  • Now use a single value column that expands the sorted array into a list. Use From Start → Row Number. This will give you a list of unique points totals in a single column, from highest to lowest
  • To get the ranking position for each, use a math column that adds 1 to the row number
  • Now back in your Players table, create a single relation that matches their points total to the single value column in your helper table
  • And finally, use a lookup column to fetch each players ranking position via that relation.

Edit: just thinking about it, you could if you wanted to, just add all those columns to your Players table. If row count is an issue, that might be a better approach. Up to you.

@madhu - I just tested the above to make sure it works. It does, but you need an extra column to reverse the sort. Here is what it looks like in the data editor:

Thank you so much for your help, but i am stuck in the single value column, can you please tell me, what values you have used there.

Please check these columns.

  • RowIndex is the column that contains Row Numbers, beginning at 0. In my example, I numbered them automatically, but you can also number them manually.
  • ReversedSort is the extra column I mentioned. It uses the Array Sort plugin to reverse the order of the sort.

Thank you so much for the help, it worked.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.