# Filter results on "Unique Count" aggregation

**URL:** <https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883>\
**Category:** Kibana\
**Created:** [February 4, 2020, 10:18pm UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883 "2020-02-04T22:18:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaimin161](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jaimin161](https://discuss.elastic.co/u/jaimin161)\
**Post date:** [February 4, 2020, 10:18pm UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883/1 "2020-02-04T22:18:23Z")

</div>

I'm building Data Table visulizer in Kibana, where I'm using Unique Count aggregation. It returns data correctly.

But my users needs to filter data based Unique Count (Show results \<= #n of Unique Counts).

Any help would be appreciated.

**Ex** : in below screen shot, we would like to show only those DBs where Unique SQL Count is \<= 321.

 ![Screen Shot 2020-02-04 at 4.16.08 PM](https://us1.discourse-cdn.com/elastic/original/3X/0/3/033f9a734e2340beb3552e6cc7de4897f5f4d57d.png)

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [February 4, 2020, 11:03pm UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883/2 "2020-02-04T23:03:08Z")

</div>

Hi @jaimin161. I do not see a way to do this currently. I think we need to implement the bucket selector pipeline aggregation in Kibana to make this possible. Feel free to express your use case and need in this issue. [https://github.com/elastic/kibana/issues/17544](https://github.com/elastic/kibana/issues/17544)

---

<div class="post-metadata">

**Author:** ![jaimin161](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jaimin161](https://discuss.elastic.co/u/jaimin161)\
**Post date:** [February 5, 2020, 10:28pm UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883/3 "2020-02-05T22:28:28Z")

</div>

Pretty disappointing. Any alternatives?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [February 6, 2020, 1:00am UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883/4 "2020-02-06T01:00:50Z")

</div>

Hi @jaimin161 I have found no alternatives. As I said, the best thing you can do for now is express your need in the aforementioned GitHub issue.

---

<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:** [March 5, 2020, 1:00am UTC](https://discuss.elastic.co/t/filter-results-on-unique-count-aggregation/217883/5 "2020-03-05T01:00:56Z")

</div>

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