# Kibana - aggregation in graphs (average number of things per bucket)

**URL:** <https://discuss.elastic.co/t/kibana-aggregation-in-graphs-average-number-of-things-per-bucket/311291>\
**Category:** Kibana\
**Created:** [August 3, 2022, 10:29am UTC](https://discuss.elastic.co/t/kibana-aggregation-in-graphs-average-number-of-things-per-bucket/311291 "2022-08-03T10:29:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [August 11, 2022, 4:15pm UTC](https://discuss.elastic.co/t/kibana-aggregation-in-graphs-average-number-of-things-per-bucket/311291/7 "2022-08-11T16:15:09Z")

</div>

Hey @RonGros, If I was going about this, I would change the data to have a parsed `dayOfScreening` field made from rounding the timestamp to the day. You could do that at ingest time, which is how I would do it, or you could create a [scripted field](https://www.elastic.co/blog/using-painless-kibana-scripted-fields). [Here](https://discuss.elastic.co/t/help-in-parsing-date-from-timestamp-using-painless/157233) is an example of something similar being done.

In my opinion, with elasticsearch it is _always_ better to think your data problems through from the ingestion side, even if it results in repeated information.

---

_[View the full topic](https://discuss.elastic.co/t/kibana-aggregation-in-graphs-average-number-of-things-per-bucket/311291)._
