# Sort from hi to low value by unique count

**URL:** <https://discuss.elastic.co/t/sort-from-hi-to-low-value-by-unique-count/88671>\
**Category:** Kibana\
**Created:** [June 8, 2017, 7:22am UTC](https://discuss.elastic.co/t/sort-from-hi-to-low-value-by-unique-count/88671 "2017-06-08T07:22:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Przem\_Bar](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Przem\_Bar](https://discuss.elastic.co/u/Przem_Bar)\
**Post date:** [June 8, 2017, 7:22am UTC](https://discuss.elastic.co/t/sort-from-hi-to-low-value-by-unique-count/88671/1 "2017-06-08T07:22:06Z")

</div>

I need to show all response time by unique occurrence sorted from hi to low  
So having data like r1:10, r2:10, r3:20 gives me chart with 2 bars  
Currently tried something like this (but y is cut to histogram range)

 ![](https://us1.discourse-cdn.com/elastic/original/3X/0/6/0679c26978535aba384b1dc9eee76d2f860218b6.png)

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [June 8, 2017, 4:15pm UTC](https://discuss.elastic.co/t/sort-from-hi-to-low-value-by-unique-count/88671/2 "2017-06-08T16:15:45Z")

</div>

Hello,

You can use a `Terms` aggregation on the X-Axis for the responseDuration field.

---

<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:** [July 6, 2017, 4:15pm UTC](https://discuss.elastic.co/t/sort-from-hi-to-low-value-by-unique-count/88671/3 "2017-07-06T16:15:50Z")

</div>

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