# Sorting Multiple columns

**URL:** <https://pug.phocassoftware.com/t/sorting-multiple-columns/645>\
**Category:** Ask the Community\
**Created:** [July 13, 2018, 7:22am UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645 "2018-07-13T07:22:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonKemp](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/jonkemp/32/334_2.png) [@JonKemp](https://pug.phocassoftware.com/u/JonKemp)\
**Post date:** [July 13, 2018, 7:22am UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645/1 "2018-07-13T07:22:26Z")

</div>

Hi all,

Very silly basic question, but cannot see how you do it. How do you sort a grid or nested view on multiple columns. Example, I have a nested widget on Fiscal year followed by Fiscal Period, followed by Customer which shows the sales. Sorting on period puts the first fiscal year at the top wheras I want last fiscal period at the top. Sort descending on year but ascending on period followed by sorting the measure by highest value (total of 3 sorts) I.e. its showing:

2017 - 01  
- 02  
-03  
…  
2018 - 01  
-02  
-03  
…  
I want:  
2018 - 01  
- 02  
-03  
…  
2017 - 01  
-02  
-03  
…

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![StuartH](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/stuarth/32/394_2.png) [@StuartH](https://pug.phocassoftware.com/u/StuartH)\
**Post date:** [February 6, 2019, 12:37pm UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645/2 "2019-02-06T12:37:17Z")

</div>

I’ll bump this one as was going to post something similar.

I find I need to sort by multiple columns too maybe one property and one measure, or sometimes more than one measure - e.g. Weeks Cover + Stock Value or multiple columns of an Aged Debt report.

---

<div class="post-metadata">

**Author:** ![StuartH](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/stuarth/32/394_2.png) [@StuartH](https://pug.phocassoftware.com/u/StuartH)\
**Post date:** [April 25, 2019, 2:55pm UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645/3 "2019-04-25T14:55:16Z")

</div>

This is frustrating, I really need to sort by multiple properties and sometimes multiple measures.

Surely this isn’t that difficult to develop?

---

<div class="post-metadata">

**Author:** ![jowsley](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/jowsley/32/1060_2.png) [@jowsley](https://pug.phocassoftware.com/u/jowsley)\
**Post date:** [March 4, 2022, 4:46pm UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645/4 "2022-03-04T16:46:06Z")

</div>

I have a similar need to sort on multiple columns. Has a solution emerged?

---

<div class="post-metadata">

**Author:** ![hamish.keith](https://avatars.discourse-cdn.com/v4/letter/h/58956e/32.png) [@hamish.keith](https://pug.phocassoftware.com/u/hamish.keith)\
**Post date:** [March 29, 2023, 8:38pm UTC](https://pug.phocassoftware.com/t/sorting-multiple-columns/645/5 "2023-03-29T20:38:45Z")

</div>

Thanks for the suggestion. We have passed this through to our designer to see what we can do (early days). We will initially look at this in the main grid and will review if it is functionality which fits with the nested grid.
