🥇🥈🥉 Convert Number Score to Rankings in Glide!

Using a combination of new Glide Plugin Columns, you can now rank items based on a raw value (points, score, scale, etc.)

23 Likes

Awesome!

Instead of Join, Split, try Lookup Points on the Things table.

7 Likes

Ooo nice…one less column!

2 Likes

Make this adjustment in order to have your list items “tie” for rank values without skipping ranks:

2 Likes

@Robert_Petitto do you mind if I use this in an education video? Will give you a shoutout.

2 Likes

Hmm… looks like we need to add numerical sorting to make this really work?

2 Likes

Oof. Good catch. Yes, for sure.

@Darren_Murphy has also noted the other types we need Sort Array does not work on arrays of dates · Issue #58 · glideapps/glide-code-columns · GitHub

I’m still going to use it though. Thanks @Robert_Petitto. I needed a good use case to crack open tutorials on Array column stuff.

3 Likes

Ya…this is disappointing.


@david I submitted an issue: Sort Array column does not sort numbers · Issue #85 · glideapps/glide-code-columns · GitHub

Hola @Robert_Petitto and @JackVaughan

Very weird the situation, I tested that plugin days ago and worked perfectly using a Number or Text column, it was even very smart by sorting the array.
Today I retested it and it still works perfectly!.

Here my result when my Num column is Number type
image

image

and here when my Num column is Text type. The plugin was very smart to recognize that all text values were numbers and could sort it perfect. Otherwise, the sequence would have been different (what Robert has).

image

Regarding the sorting an array of dates, this is true, the plugin fails. Here I wrote an advise to David about this issue:
🆕 20 new experimental code columns to play with - #33 by gvalero

Saludos!

3 Likes

@gvalero you’re right. It does sort arrays of numbers correctly. @JackVaughan @Robert_Petitto how did you guys manage to break it? :thinking: :rofl:

Okay, I think I figured out how it breaks. It depends how you create your array.

  • If you create the array via Joined List → Split text, then pass that to the Array Sort, then it breaks. (It actually does a lexical sort instead of a numerical sort)

  • But if you create the array via a Lookup (as @david suggested), then it works perfectly.

4 Likes

It breaks when I’m sorting the Unique Array: @JackVaughan @david

2 Likes

Updated video. See original post :point_up:

1 Like

Cool tutorial for leaderboards!

One question - how would you display ties?

For example) display as “Tied for 3rd”

I assume you would have to use (at least) ITE and Template columns… the Template being the result of the ITE and your text, but how would the ITE work?

Would this be an example of when you would need a conditional relation? :thinking:

Thanks again for the tutorial!

There is a lot of discussion on ties in this thread.

2 Likes

I’ll check it out - thanks Jeff!

1 Like

What I would do is continue on by creating a multiple relation from the ordinal rank column to itself. Then create a rollup column to see how many times that rank exists. Then create an if then else column that looks to see if the Rollup is greater than one and if so results in “Tied for” else blank. Lastly, create a Template Column that starts with that if then else and ends with the rank.

4 Likes

:fire: :fire: :fire:

Awesome!

Thanks Bob!

Just to add to my dilemmas of ranking. Each position entry needs to be sorted into categories prior to ranking.
For the life of me, I just can’t seem to find a workable option other than creating multiple sheets for the same event.
I’m a medic by profession so forgive my data naivete.

Nah. Just create a multiple relation from the category back to itself. Then, the very first lookup column will be based off the relation column and not just the sheet column.

6 Likes