# Count aggregation doubt

**URL:** https://discuss.elastic.co/t/count-aggregation-doubt/162812
**Category:** Kibana
**Created:** [January 3, 2019, 1:20pm UTC](https://discuss.elastic.co/t/count-aggregation-doubt/162812 "2019-01-03T13:20:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Apple23](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Apple23](https://discuss.elastic.co/u/Apple23)
#### Post date: [January 3, 2019, 1:20pm UTC](https://discuss.elastic.co/t/count-aggregation-doubt/162812/1 "2019-01-03T13:20:11Z")

</div>

For my data table visualisation i want only those rows whose count is 2(the metric aggregation count value is true)How to do it?

---

<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: [January 4, 2019, 6:07pm UTC](https://discuss.elastic.co/t/count-aggregation-doubt/162812/2 "2019-01-04T18:07:19Z")

</div>

You can set the `min_doc_count` parameter to `2` in your terms aggregation by adding `{ "min_doc_count": 2 }` in the JSON Input Field under the Advanced settings in your Buckets.

 ![02%20AM](https://us1.discourse-cdn.com/elastic/original/3X/c/b/cbf0c115e2b18085256c12ed8f5376a77f4b2e44.png)

---

<div class="post-metadata">

### Author: ![Apple23](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Apple23](https://discuss.elastic.co/u/Apple23)
#### Post date: [January 6, 2019, 5:55am UTC](https://discuss.elastic.co/t/count-aggregation-doubt/162812/3 "2019-01-06T05:55:59Z")

</div>

> [@nickpeihl](#):
>
> { "min\_doc\_count": 2 }

Thank you for your solution

---

<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: [February 3, 2019, 5:56am UTC](https://discuss.elastic.co/t/count-aggregation-doubt/162812/4 "2019-02-03T05:56:02Z")

</div>

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