# Metric count on multiple indices

**URL:** <https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849>\
**Category:** Kibana\
**Created:** [July 18, 2015, 6:14pm UTC](https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849 "2015-07-18T18:14:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdominik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cdominik/32/3783_2.png) [@cdominik](https://discuss.elastic.co/u/cdominik)\
**Post date:** [July 18, 2015, 6:14pm UTC](https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849/1 "2015-07-18T18:14:34Z")

</div>

Hi All,  
I'm using ES and Kibana on my thesis work and I faced up to the count metric  
the question is, is there a way to count grouping by index ?  
I mean, I would like to get 1 point even if the searched term (e.g color:red) is present more than once into the index; of course if the term is present in other index too I would get the count of index where term is present.

thanks in advance  
Dominik

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [July 20, 2015, 5:27am UTC](https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849/2 "2015-07-20T05:27:26Z")

</div>

Would using the "Unique Count" aggregation on an index pattern that points to these multiple indices address your use case?

---

<div class="post-metadata">

**Author:** ![asafyigal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asafyigal/32/685_2.png) [@asafyigal](https://discuss.elastic.co/u/asafyigal)\
**Post date:** [July 20, 2015, 6:39am UTC](https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849/3 "2015-07-20T06:39:28Z")

</div>

You can group and count by index but I don't know of a way to do a unique count. What's called "Unique Count" in Kibana that @tbragin has mentioned is using the Cardinality Aggregation which is fast but not accurate - You can improve accuracy but I am not sure you can ever be sure the data is 100% accurate.

-- Asaf.

---

<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:16pm UTC](https://discuss.elastic.co/t/metric-count-on-multiple-indices/25849/4 "2017-07-06T14:16:12Z")

</div>


