# Visualization Sort

**URL:** <https://discuss.elastic.co/t/visualization-sort/79282>\
**Category:** Kibana\
**Created:** [March 20, 2017, 3:47pm UTC](https://discuss.elastic.co/t/visualization-sort/79282 "2017-03-20T15:47:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rbethke](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@Rbethke](https://discuss.elastic.co/u/Rbethke)\
**Post date:** [March 20, 2017, 3:47pm UTC](https://discuss.elastic.co/t/visualization-sort/79282/1 "2017-03-20T15:47:19Z")

</div>

This seems like a very simple thing but I'm stumped.

I have a simple Kibana visualization with a count and an average and I can't get it to sort by the average. I am aware of the arrows at the tops of the columns which _should_ allow me to sort by any column. However, the arrows only work to sort the average column highest to lowest - when they work at all. I've tried rebuilding the visualization as well as recreating it, with no luck. I've also tried removing the count and still can't sort by the average.

This is my second time asking this question, any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [March 21, 2017, 8:26pm UTC](https://discuss.elastic.co/t/visualization-sort/79282/2 "2017-03-21T20:26:21Z")

</div>

It's not the most intuitive thing ever, but you can accomplish this.

Under "buckets", you should see an option under your bucket aggregation for "Order By". By default, it will be whatever your first metric is (in your case, "metric: Count"). However, you should be able to select the other metrics you have configured, or even order by a custom metric.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8186e94ed8a1f5fd4ca77a2713d7393813f9f17.png)

I hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 18, 2017, 8:26pm UTC](https://discuss.elastic.co/t/visualization-sort/79282/3 "2017-04-18T20:26:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
