# Sort Pivot Table by Rows Collapsed

**URL:** <https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703>\
**Category:** Q&A\
**Tags:** analysis, pivot-table, error, visuals, feature-request, tables, charts, formatting, Business-Intelligence-Engineer, quick-sight\
**Created:** [June 24, 2024, 4:58pm UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703 "2024-06-24T16:58:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stormsarah](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@stormsarah](https://community.amazonquick.com/u/stormsarah)\
**Post date:** [June 24, 2024, 4:58pm UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/1 "2024-06-24T16:58:52Z")

</div>

When trying to sort a pivot table by a particular column, is there a way to sort it based on the hierarchy expanded?

For example: Application is my 3rd column in the pivot table, so if I select a month and sort it ascending that column will sort by the aggregated application value. If that column is collapsed and I do the same with only the product showing, it will not sort by product.

Sorted with the pivot table expanded:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/b/f/bf06ff4e818527dfe7aca997a325ea46ad664828.png)

Sorted with the pivot table collapsed:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/7/a/7ae7e4e5f264b689dbfffd5dfcd7d6c3da77c89f.png)

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [June 24, 2024, 8:21pm UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/2 "2024-06-24T20:21:44Z")

</div>

Hi @stormsarah,  
Unfortunately pivot tables do not provide the best options when it comes to sorting data so it does not give you the ability to sort by other factors. I agree though that this would be a productive fix so I will go ahead and mark this as a feature request.

Thank you!

---

<div class="post-metadata">

**Author:** ![stormsarah](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@stormsarah](https://community.amazonquick.com/u/stormsarah)\
**Post date:** [June 24, 2024, 8:52pm UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/3 "2024-06-24T20:52:20Z")

</div>

Thanks @Brett for the response. Is there any creative workaround to solution this? It’s a small thing but a fairly urgent task for our team to resolve.

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [June 25, 2024, 3:21pm UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/4 "2024-06-25T15:21:39Z")

</div>

Hi @stormsarah,  
I ran a number of different tests to try and find a work around but unfortunately, the pivot tables’ functionality does not allow that type of sorting.

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [June 28, 2024, 5:33am UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/5 "2024-06-28T05:33:09Z")

</div>

Hi @stormsarah, besides using SQL or multiple visuals stacked next to each other – I’m out of ideas. Sorry, currently this is not possible but I’m marking this for feature request. At AWS, their roadmap is primarily driven by customers. Your feedback helps them build a better service. I have tagged this as a feature request. More features are being added on a regular basis, so please keep an eye on the [What’s New / Blog](https://community.amazonquick.com/c/announcements/). You can set up a Watching Alert by clicking on the bell icon.

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [June 28, 2024, 5:33am UTC](https://community.amazonquick.com/t/sort-pivot-table-by-rows-collapsed/31703/6 "2024-06-28T05:33:12Z")

</div>

Archived on June 28, 2024, 5:33am UTC


