# Average of counts on sub-buckets

**URL:** <https://discuss.elastic.co/t/average-of-counts-on-sub-buckets/46710>\
**Category:** Kibana\
**Created:** [April 7, 2016, 3:36pm UTC](https://discuss.elastic.co/t/average-of-counts-on-sub-buckets/46710 "2016-04-07T15:36:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Whittaker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_whittaker/32/75325_2.png) [@Adam\_Whittaker](https://discuss.elastic.co/u/Adam_Whittaker)\
**Post date:** [April 7, 2016, 3:36pm UTC](https://discuss.elastic.co/t/average-of-counts-on-sub-buckets/46710/1 "2016-04-07T15:36:29Z")

</div>

Hello, I am using the latest stable version of Kibana and was wondering if there was a way to get the average of the count. Im not sure if its possible or not but when selecting average i can only select a numeric field and not the counts of another aggregation.

So if i have a line chart of login count per user (over a monthly date histo), how can i show another line with the average of those users logins. Thanks

---

<div class="post-metadata">

**Author:** ![Adam\_Whittaker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_whittaker/32/75325_2.png) [@Adam\_Whittaker](https://discuss.elastic.co/u/Adam_Whittaker)\
**Post date:** [April 7, 2016, 5:33pm UTC](https://discuss.elastic.co/t/average-of-counts-on-sub-buckets/46710/2 "2016-04-07T17:33:38Z")

</div>

From the looks of it i believe this is not supported and the only thing i could see would be creating another index that contains the count for each user per day, then i can use the normal average on the count field.

---

<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, 1:56pm UTC](https://discuss.elastic.co/t/average-of-counts-on-sub-buckets/46710/3 "2017-07-06T13:56:37Z")

</div>


