# How to use a query column to Rank a column of Scores

**URL:** https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115
**Category:** Ask for Help
**Created:** [February 24, 2024, 2:30pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115 "2024-02-24T14:30:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ToOFa\_Apps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/toofa_apps/32/36816_2.png) [@ToOFa\_Apps](https://community.glideapps.com/u/ToOFa_Apps)
#### Post date: [February 24, 2024, 2:30pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/1 "2024-02-24T14:30:07Z")

</div>

People have score points and i need to know the rank of their score.  
Example:  
Scores - 500,230,400,158,300 going down the first column  
Second column - Ranked 1st, Ranked 4th, Ranked 2nd, Ranked 5th, Ranked 3rd  
I can do this the old way with many columns but can someone show me how to do this using the query column?  
Many Thanks.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 24, 2024, 2:40pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/2 "2024-02-24T14:40:06Z")

</div>

This is just off the top of my head, and doesn’t handle ties…

- Create a Query column, target at the Scores column and sort by Score descending
- Create a Lookup column that fetches the RowID via the Query to create an array of RowIDs
- Find Element Index that gets each RowID Index from the array of RowIDs
- Add one to that to get the Rank

---

<div class="post-metadata">

### Author: ![ToOFa\_Apps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/toofa_apps/32/36816_2.png) [@ToOFa\_Apps](https://community.glideapps.com/u/ToOFa_Apps)
#### Post date: [February 24, 2024, 2:51pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/3 "2024-02-24T14:51:42Z")

</div>

Okay perfect. Thanks Darren I will try this shortly.

---

<div class="post-metadata">

### Author: ![ToOFa\_Apps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/toofa_apps/32/36816_2.png) [@ToOFa\_Apps](https://community.glideapps.com/u/ToOFa_Apps)
#### Post date: [February 24, 2024, 3:16pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/4 "2024-02-24T15:16:33Z")

</div>

It works and i would think less taxing on the system, but still 6 columns till result.  
Query \> Lookup \> Find \> Align \> Ordinal \> Template  
Thanks Darren for your help

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [February 24, 2024, 3:16pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/5 "2024-02-24T15:16:45Z")

</div>

Just built this with updating Darren’s instructions a bit! ( calculate ties too! )

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/0/3072e5a382005eedd9e7bb043ddaf227a23aa4b6.webp "Ranks in glide") ](https://vimeo.com/916269774)

**Edit :**

**Read your question again and saw that you need it backwards and understood that why darren mentioned sort the query column in descending.**

**After making it as descending :**

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7dd094f7cfa7d851a0c5e6565951de981e162389.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/7/37997cefcb329dadcbe75fdbb6d4584e6499468f.png)

---

<div class="post-metadata">

### Author: ![ToOFa\_Apps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/toofa_apps/32/36816_2.png) [@ToOFa\_Apps](https://community.glideapps.com/u/ToOFa_Apps)
#### Post date: [February 24, 2024, 3:39pm UTC](https://community.glideapps.com/t/how-to-use-a-query-column-to-rank-a-column-of-scores/71115/6 "2024-02-24T15:39:33Z")

</div>

Thanks for this. It’s around the same number of columns but nice to have solutions for ties. The old way of relate/lookup/find/sort/reverse etc can also accommodate ties. But i’ve always wanted a way to just assign ties a consecutive rank. Nice to have options, thanks for all the help.
