# Why the unique count of some item is larger than count in table chart of kibana?

**URL:** https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374
**Category:** Kibana
**Created:** [November 12, 2015, 2:55am UTC](https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374 "2015-11-12T02:55:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zpli](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@zpli](https://discuss.elastic.co/u/zpli)
#### Post date: [November 12, 2015, 2:55am UTC](https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374/1 "2015-11-12T02:55:52Z")

</div>

As shown in the first fig.1, the unique count of group\_id is larger than the count of logs. When search the logs with the same filters, I find only 8 logs (in fig.2), why the unique count of group\_id is 9 ?

fig.1

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0936bfeff1323cccd05cc37d2ee7bada05c0486d.png)

fig.2

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/5c7211e4bd6cbc1a16e1348ba1dc0c9ec873c3f6.png)

---

<div class="post-metadata">

### Author: ![Chris\_Tarnas](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Chris\_Tarnas](https://discuss.elastic.co/u/Chris_Tarnas)
#### Post date: [December 17, 2015, 1:00am UTC](https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374/2 "2015-12-17T01:00:22Z")

</div>

I have seen this same bug - unique counts being too high. I've verified with queries outside of kibana.

---

<div class="post-metadata">

### Author: ![Chris\_Tarnas](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Chris\_Tarnas](https://discuss.elastic.co/u/Chris_Tarnas)
#### Post date: [December 17, 2015, 1:04am UTC](https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374/3 "2015-12-17T01:04:47Z")

</div>

Just found the answer in the cardinality section of the elastic search manual: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html)

Adding something like this to the advanced json for the aggregation helps {"precision\_threshold":1000}. Check the docs for how to set the threshold appropriately for your data.

---

<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, 2:06pm UTC](https://discuss.elastic.co/t/why-the-unique-count-of-some-item-is-larger-than-count-in-table-chart-of-kibana/34374/4 "2017-07-06T14:06:24Z")

</div>


