# Multiple highest values and rankings

**URL:** <https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611>\
**Category:** Ask for Help\
**Created:** [October 1, 2022, 6:52am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611 "2022-10-01T06:52:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [October 1, 2022, 6:52am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/1 "2022-10-01T06:52:44Z")

</div>

I’m trying to rewrite the template “sports team”. I want to have the top leader in every category to be shown in a list, with picture and name, e.g “Points per game”, “Assist per game” and so on.

You should also be able to click on “Points per game” and then get moved to another page with a list, of every players “Points per game” sorted from highest to lowest.

I want this to be dynamic, so when I change the stats in the main sheet, the list should change as well.

Main sheet contains all the players and all of their different stats.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [October 1, 2022, 7:02am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/2 "2022-10-01T07:02:55Z")

</div>

in the inline options, click sort data, and change to the rank column

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 1, 2022, 10:42am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/3 "2022-10-01T10:42:45Z")

</div>

I think what you can do is:

- Have a rich text component for each “List title”
- Display each list, sorted by its respective category under each title.
- Each rich text title will have the action being “show new screen” \> this item, and then you add the corresponding inline list to that screen.

It would be easier if you can have different screens using the “See all” option, but unfortunately it’s not the case when I last checked that feature.

---

<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:** [October 2, 2022, 9:40am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/5 "2022-10-02T09:40:22Z")

</div>

@Robert_Petitto has a tutorial on this topic. Might not be exactly what you are looking for, but should give you some ideas.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/5/85d52dfc2c6fa59b69ebf006cb6cad7d5e3e8944.jpeg "Glide: Create a RANKED Leaderboard!") ](https://www.youtube.com/watch?v=QvNTzYx7tvI)

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [October 2, 2022, 9:55am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/6 "2022-10-02T09:55:25Z")

</div>

@Darren_Murphy I have already watched this video. I want to create an app, that looks like the pictures. However, what I have created now is not dynamic. I have manually typed in the highest scorer, and when I click on “Rebound Per Game”, I get moved to the list over “Points Per Game”. How can I change this, so Glide automatically finds the top player in each category, and then shows their name and image. And then you can click on it, and see the full list over the category.

 ![Screenshot 2022-10-02 at 11.42.52](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/c/8c62d89659407e0d2f36d1fae99106af95a575d1.png)

---

<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:** [October 2, 2022, 10:19am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/7 "2022-10-02T10:19:01Z")

</div>

I can’t see you data, so I can’t tell you _exactly_ how to do it, but in general…

> [@Alexander\_Rubino](#):
>
> How can I change this, so Glide automatically finds the top player in each category,

For this, you could probably use a rollup-\>max to find the highest value, and then use that to create a single relation to the first player that has that value. (I say the first, because you could have multiple players that match the maximum, in which case the single relation would match the first one).

> [@Alexander\_Rubino](#):
>
> and then shows their name and image.

Once you have the above single relation in place, you would normally use lookup columns to obtain these values.

> [@Alexander\_Rubino](#):
>
> And then you can click on it, and see the full list over the category.

This should be a simple “Show Detail Screen” action targeted at the appropriate category.

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [October 2, 2022, 10:33am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/8 "2022-10-02T10:33:41Z")

</div>

@Darren_Murphy I tried the rollup method, and this is how it turned out. I can’t make a list out of “Max Points”, “Max Rebounds” and “Max Assist”, what am I doing wrong?

 ![Screenshot 2022-10-02 at 12.30.40](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/f/7f7ee9675dae3b43287346d04383f3e263589db9.png)

---

<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:** [October 2, 2022, 11:41am UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/9 "2022-10-02T11:41:21Z")

</div>

Let’s deal with one step at a time.  
The first step is to find the Player with the Max Points, right?  
Take your Max Points rollup column, and use that to create a single relation column. You want to match the Max Points (rollup) column with the Points per game column.  
Then do the same for each of Max Rebounds and Max Assist.

As a side note, I would probably be creating these columns in a separate single row helper table, as that would make things a bit easier to work with. But it can still work this way, so that’s up to you.

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [October 2, 2022, 12:49pm UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/10 "2022-10-02T12:49:53Z")

</div>

@Darren_Murphy Great, I have done that, what am I supposed to do then? How can I import these different lists into one list?

---

<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:** [October 2, 2022, 1:01pm UTC](https://community.glideapps.com/t/multiple-highest-values-and-rankings/50611/11 "2022-10-02T13:01:48Z")

</div>

Okay, next step…

You’ll need the names of each of your 3 players. For this, you’ll need 3 lookup columns. Each lookup column should take the Name via each respective single relation. Assuming you need their images, use the same method.

Once you have those, you can move to the layout view.  
Start with a details screen, and make the source of the details screen the table you’ve been adding these columns to.  
Then add 3 components to the screen. They can be any components, as long as you attach an action to them. For this use, a Title component might be a good choice, as you could include the player image, the category, and the max value. Each one of the components will be used for one of your 3 categories. So in each one, you could show the player name, and whatever the max value is for that category.

Now, each component will need an action that does Show New Screen-\>This Item.  
This will give you 3 separate details screens, one for each of the categories. On each of them, you can add an inline list and configure according to the corresponding category.

~~Actually, @Alexander_Rubino - I just realised that you might still have a problem here. Because each inline list will be using the same table, you might not be able to configure them differently. So you might need a slightly modified approach. Let me just quickly test that.~~

No, ignore the above comment. The approach that I outlined will work.
