# Sub aggregation affects total count

**URL:** <https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282>\
**Category:** Kibana\
**Created:** [October 29, 2015, 5:18pm UTC](https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282 "2015-10-29T17:18:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergeyb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergeyb/32/5574_2.png) [@sergeyb](https://discuss.elastic.co/u/sergeyb)\
**Post date:** [October 29, 2015, 5:18pm UTC](https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282/1 "2015-10-29T17:18:17Z")

</div>

**Current behavior:**  
When creating a bar chart with only one "term" aggregation, the results show real amount of items (assuming simple count metric on the Y-Axis). However, when adding sub-aggregation of a "term" type, total count reduces.  
**Reasoning:**  
Well, I understand the reason. I had to pick top X entries on the sub-aggregation, and certainly I filtered out some portion of my data.  
**Enhancement request:**  
It would be nice to have my top X entries, and additionally artificial term named "Others", which shows cumulative aggregation for the rest of my data.

Please let me know if anyone else has similar problem and whether or not you believe this is a legitimate request.

---

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [November 2, 2015, 8:13am UTC](https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282/2 "2015-11-02T08:13:45Z")

</div>

Its a legitimate question/request... one that was available in Kibana3 , but due to facets being replaced with aggregations in elasticsearch , its not entirely possible to do at the moment.

It is reccomended to log requests on github through.  
Here is the current discussion around it

> <https://github.com/elastic/kibana/issues/1961>

---

<div class="post-metadata">

**Author:** ![sergeyb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergeyb/32/5574_2.png) [@sergeyb](https://discuss.elastic.co/u/sergeyb)\
**Post date:** [November 2, 2015, 11:39am UTC](https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282/3 "2015-11-02T11:39:43Z")

</div>

Thanks for the reference, that's exactly what I was looking for 😉  
I'll use github for such requests in the future.

---

<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:10pm UTC](https://discuss.elastic.co/t/sub-aggregation-affects-total-count/33282/4 "2017-07-06T14:10:08Z")

</div>


