# 'Most Used' Category

**URL:** https://community.glideapps.com/t/most-used-category/79471
**Category:** Ask for Help
**Created:** [January 24, 2025, 3:52am UTC](https://community.glideapps.com/t/most-used-category/79471 "2025-01-24T03:52:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![B\_Estrada](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/b_estrada/32/83018_2.png) [@B\_Estrada](https://community.glideapps.com/u/B_Estrada)
#### Post date: [January 24, 2025, 3:52am UTC](https://community.glideapps.com/t/most-used-category/79471/1 "2025-01-24T03:52:51Z")

</div>

![Screenshot 2025-01-23 at 8.46.54 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/1/11bcf3a63850f0a8b3afa2e24a95797455e13db9.jpeg)

Hello, I have an app that takes information from various inspection forms and presents them in a dashboard. My client asked if I can include a ‘Most Used’ category for each table. So I need the app to automatically display the category with the most votes. I have attached a picture of one of the tables. Any help is greatly appeciated.

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [January 26, 2025, 1:21am UTC](https://community.glideapps.com/t/most-used-category/79471/2 "2025-01-26T01:21:08Z")

</div>

Are these votes stored in Glide?

---

<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: [January 26, 2025, 4:42am UTC](https://community.glideapps.com/t/most-used-category/79471/3 "2025-01-26T04:42:19Z")

</div>

I would suggest a Categories table. (Categories are stored in their own table, e.g., “Position of people,” “PPE”)

1. **Link Inspections to Categories**

- In your **Categories Table** , add a _Relation column_ pointing to your **Inspections Table** , using whatever is the value linking the two together (ideally IDs, but it might be the category name in your case)

1. **Count Category Votes**

- In your **Categories Table** , create a _Rollup column_:
  - **Relation** : Select the relation above.
  - **Aggregate** : `Count` on rowID/Categories column.
  - **Name** : “Total Votes”

1. **Find the Most Votes Category**

- Create a **Query** in the Users Table, targetting the **Categories** table:
  - **Sort By** : “Total Votes” (Descending).
  - **Name** : “Top Categories”.

1. Display the result with a single value column targetting the query above, getting back the first category name.

---

<div class="post-metadata">

### Author: ![B\_Estrada](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/b_estrada/32/83018_2.png) [@B\_Estrada](https://community.glideapps.com/u/B_Estrada)
#### Post date: [January 26, 2025, 8:47pm UTC](https://community.glideapps.com/t/most-used-category/79471/4 "2025-01-26T20:47:21Z")

</div>

Yes they are all stored in Glide
