# Fun problem: Average of the bucketed count for time of the day in time range

**URL:** <https://discuss.elastic.co/t/fun-problem-average-of-the-bucketed-count-for-time-of-the-day-in-time-range/187463>\
**Category:** Kibana\
**Created:** [June 26, 2019, 2:52am UTC](https://discuss.elastic.co/t/fun-problem-average-of-the-bucketed-count-for-time-of-the-day-in-time-range/187463 "2019-06-26T02:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xi\_Chen1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xi_chen1/32/48788_2.png) [@Xi\_Chen1](https://discuss.elastic.co/u/Xi_Chen1)\
**Post date:** [June 26, 2019, 2:52am UTC](https://discuss.elastic.co/t/fun-problem-average-of-the-bucketed-count-for-time-of-the-day-in-time-range/187463/1 "2019-06-26T02:52:41Z")

</div>

Duration 2 wks  
Bucket size: 1 hr

Let's say we want to get an average count for each time of the day bucket (1 hour) for last 2 wks.

The chart should have 24 buckets, for each bucket is an average count of all the documents with timestamp in that time of the day for the last 2 weeks.

Any one have cool idea of how to tackle this?

---

<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 24, 2019, 3:00am UTC](https://discuss.elastic.co/t/fun-problem-average-of-the-bucketed-count-for-time-of-the-day-in-time-range/187463/2 "2019-07-24T03:00:20Z")

</div>

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