# Reports: How to sort Groups in a a chart by their aggregated value?

**URL:** <https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378>\
**Category:** Get Help\
**Created:** [April 26, 2023, 6:52pm UTC](https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378 "2023-04-26T18:52:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [April 26, 2023, 6:52pm UTC](https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378/1 "2023-04-26T18:52:52Z")

</div>

I have a bar chart that shows aggregated values of Call records (blue line = `SUM(Call duration)`).

These are grouped by `Call Owner` (Salesperson) to allow comparing each Salesperson’s performance.

How to sort these Groups (Call Owners/Salespersons) by their displayed value?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/a/a966088769f97d37818c983ee6dea918fa2bb299.png)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 26, 2023, 7:53pm UTC](https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378/2 "2023-04-26T19:53:39Z")

</div>

It looks like your using a table format, but I think you might be better suited to using a chart.  
You can have the y axis being the Call owner, and the x-axis being the (sum of) Call duration, and then sort the y-axis by Call duration.  
Is that viable?

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [April 26, 2023, 9:00pm UTC](https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378/3 "2023-04-26T21:00:19Z")

</div>

Here is a Chart type report, but with the same problem:

I cannot see how to sort the Y-axis **groups** (“Call Owner”) according to _values associated with the entities_ - can only sort by the entity Names.

In this chart I am grouping `Calls` records by associated `Call Owner`. In this case I want to sort the GROUPS (the `Call Owners`) by the SUM of the group’s associated Calls’ `Call Length`s field (`Secs` in the Y-axis chooser).

You can see what I’m trying to do - sort the Salespeople (the groups) from most to least productive, as measured by their total Call times.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/1fad5f1d32fd76cfa21c57254ee839d193d19eb3.png)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 26, 2023, 10:22pm UTC](https://community.fibery.io/t/reports-how-to-sort-groups-in-a-a-chart-by-their-aggregated-value/4378/4 "2023-04-26T22:22:44Z")

</div>

In your first table, you hadn’t broken down the call length into groups so I assumed this wasn’t needed.  
In the chart, remove the Secs field from the y axis, leaving only the names, and make sure the x axis is the sum of call duration.  
Then you can apply a sort to the names on the y axis where you don’t sort by name, but by the duration sum.
