# Calculating Average Daily Count over 30 Days

**URL:** <https://discuss.elastic.co/t/calculating-average-daily-count-over-30-days/262758>\
**Category:** Kibana\
**Created:** [January 31, 2021, 3:21pm UTC](https://discuss.elastic.co/t/calculating-average-daily-count-over-30-days/262758 "2021-01-31T15:21:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clay\_Curtis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clay_curtis/32/78343_2.png) [@Clay\_Curtis](https://discuss.elastic.co/u/Clay_Curtis)\
**Post date:** [January 31, 2021, 3:21pm UTC](https://discuss.elastic.co/t/calculating-average-daily-count-over-30-days/262758/1 "2021-01-31T15:21:19Z")

</div>

I am trying to make a table visualization that shows the 30-day averages of the daily averages of log volume (count) per per log source split by type.

For example,

If I have 10 log sources, half are firewalls, and half are windows hosts. Firewalls send logs that are of type “firewall”, and windows hosts send logs of type “wineventlog”.

I am trying to see what the 30-day average of the daily average document count is per host split by type.

I cannot seem to get the kibana table visualization quite right for this. Does anyone know how to do this calculation?

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [February 1, 2021, 7:42am UTC](https://discuss.elastic.co/t/calculating-average-daily-count-over-30-days/262758/2 "2021-02-01T07:42:38Z")

</div>

in classical visualizations this won't be possible. You can do a moving avarage but you can't specify your period (30 day). This might be possible from TSVB however, selectng moving average aggregation you can select the window size.

- under panel options select daily interal
- count metric
- moving average metric with window size 30 on count
- group by term on your log type field

i hope this is helpful.

---

<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:** [March 1, 2021, 7:43am UTC](https://discuss.elastic.co/t/calculating-average-daily-count-over-30-days/262758/3 "2021-03-01T07:43:02Z")

</div>

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