# Is it possible to have multiple sorts for a view?

**URL:** <https://community.glideapps.com/t/is-it-possible-to-have-multiple-sorts-for-a-view/56332>\
**Category:** Ask for Help\
**Created:** [January 4, 2023, 3:26pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-multiple-sorts-for-a-view/56332 "2023-01-04T15:26:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Patterson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sean_patterson/32/49664_2.png) [@Sean\_Patterson](https://community.glideapps.com/u/Sean_Patterson)\
**Post date:** [January 4, 2023, 3:26pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-multiple-sorts-for-a-view/56332/1 "2023-01-04T15:26:06Z")

</div>

I’m organising my feedback data (from Airtable), and I’m grouping it by rating, then sorting based on rating 1-5. I would also like to add another sort within the group to show the most recent answers first. As you can see from my example, within the group, the dates are random. Is that possible?

 ![Screenshot 2023-01-04 at 15.21.57](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/6348dfcc23eec42c24cf8f048a57129a9b52252b.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:** [January 4, 2023, 3:44pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-multiple-sorts-for-a-view/56332/2 "2023-01-04T15:44:19Z")

</div>

What you could do is convert your date to an integer and combine it with your rating using a math column, and then use that column for the sort. The math formula would be something like:

```auto
Rating * 100000000
+ Year(Date) * 10000
+ Month(Date) * 100
+ Day(Date)

```

So for example, if you had a rating of 5 with todays date, you’d get `520230103`  
A rating of 5 with yesterdays date would result in `520230102`  
So your list would sort naturally first by rating, and then by date.

Here’s what that would look like in the Data Editor…

 ![Screen Shot 2023-01-04 at 11.41.17 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/1/015541fa2defdd2fe397655fc2136f9a8bef90ab.jpeg)
