# Filter of kibana : extracting documents with a condition

**URL:** https://discuss.elastic.co/t/filter-of-kibana-extracting-documents-with-a-condition/97075
**Category:** Kibana
**Created:** [August 15, 2017, 8:41am UTC](https://discuss.elastic.co/t/filter-of-kibana-extracting-documents-with-a-condition/97075 "2017-08-15T08:41:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marwa](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@marwa](https://discuss.elastic.co/u/marwa)
#### Post date: [August 15, 2017, 8:41am UTC](https://discuss.elastic.co/t/filter-of-kibana-extracting-documents-with-a-condition/97075/1 "2017-08-15T08:41:53Z")

</div>

Hi ,  
i have data of transactions, each transaction is made by a customer ,  
i want to extrat only documents where i have repeat customer (a customer that had made more then one transaction) so i have to filter the documents based on the occurrence of each customer hich have to be greater than one.Can i do this with the filter disposed in kibana with a query DSL because i need to use the results in kibana visualization.

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [August 16, 2017, 4:49pm UTC](https://discuss.elastic.co/t/filter-of-kibana-extracting-documents-with-a-condition/97075/2 "2017-08-16T16:49:55Z")

</div>

Hi Marwa,

You can use the Advanced field in visualizations to set `{ "min_doc_count": 2}` for your case. See the gif below. The data initially has values of 2, 1, 1, 5. But after I had the JSON Input those values are filtered out.

 ![Elasticsearch](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9df59e5b07c89e19e170ec3c9d2c5c9125d3ebc1.gif)

Regards,  
Lee

---

<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: [September 13, 2017, 4:50pm UTC](https://discuss.elastic.co/t/filter-of-kibana-extracting-documents-with-a-condition/97075/3 "2017-09-13T16:50:13Z")

</div>

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