# Non-unique values grouped

**URL:** <https://discuss.elastic.co/t/non-unique-values-grouped/183164>\
**Category:** Kibana\
**Created:** [May 28, 2019, 6:13pm UTC](https://discuss.elastic.co/t/non-unique-values-grouped/183164 "2019-05-28T18:13:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Vanleeuwen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_vanleeuwen/32/29528_2.png) [@Peter\_Vanleeuwen](https://discuss.elastic.co/u/Peter_Vanleeuwen)\
**Post date:** [May 28, 2019, 6:13pm UTC](https://discuss.elastic.co/t/non-unique-values-grouped/183164/1 "2019-05-28T18:13:16Z")

</div>

I am trying to find a way to find all the items whose values are not unique and be able to filter them. For example I might have documents that look like this ...

{\_id: 1, colour: gray}  
{\_id: 2, colour: gray}  
{\_id: 3, colour: blue}  
{\_id: 4, colour: blue}  
{\_id: 5, colour: red}

And what I would like to filter out is are all the documents with non-unique colours (1,2,3,4)

Is this possible?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 29, 2019, 2:10pm UTC](https://discuss.elastic.co/t/non-unique-values-grouped/183164/2 "2019-05-29T14:10:24Z")

</div>

Hey @Peter_Vanleeuwen, we can get rather close to what you're looking for with a Visualization configuration similar to the following:

 ![35%20AM](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f6a203a924f97528b4bfb6c789d32ab1c173ad12.png)

This will show you the "buckets" with the smallest "doc\_count" first, but it will include non-unique results if there aren't enough based on your bucket size.

To be able to filter out these buckets with more than one value, we'd need [https://github.com/elastic/kibana/issues/4707](https://github.com/elastic/kibana/issues/4707) which is an open enhancement request. If you'd like comment or give this issue a +1, it'll help us prioritize it appropriately.

---

<div class="post-metadata">

**Author:** ![Peter\_Vanleeuwen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_vanleeuwen/32/29528_2.png) [@Peter\_Vanleeuwen](https://discuss.elastic.co/u/Peter_Vanleeuwen)\
**Post date:** [May 29, 2019, 3:21pm UTC](https://discuss.elastic.co/t/non-unique-values-grouped/183164/3 "2019-05-29T15:21:31Z")

</div>

Yeah. I'm not even sure that issue solves my problem. The thing is I will have possibly hundreds of thousands of buckets. It makes it unwieldy. What I really need is a non-unique filter.

---

<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:** [June 26, 2019, 3:21pm UTC](https://discuss.elastic.co/t/non-unique-values-grouped/183164/4 "2019-06-26T15:21:34Z")

</div>

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