# How to get max of 10minute Moving Average

**URL:** <https://discuss.elastic.co/t/how-to-get-max-of-10minute-moving-average/234886>\
**Category:** Kibana\
**Created:** [May 29, 2020, 9:00am UTC](https://discuss.elastic.co/t/how-to-get-max-of-10minute-moving-average/234886 "2020-05-29T09:00:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhavya\_Bansal](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@Bhavya\_Bansal](https://discuss.elastic.co/u/Bhavya_Bansal)\
**Post date:** [May 29, 2020, 9:00am UTC](https://discuss.elastic.co/t/how-to-get-max-of-10minute-moving-average/234886/1 "2020-05-29T09:00:58Z")

</div>

Hi,

I have a data table in which I want to show the max of 10min and 1hr moving average of the CPU in a day. But in order to calculate 10m moving average, I have to set the minimum time interval of my data histogram bucket as 1 minute which gives me moving averages per minute instead of a single max value. If I select interval as daily, I will not get any results in 10min moving average.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/9/69d7a08fef2bb3a62638ba6c12747dccbf034e85.png)

I want single value for 10m MA CPU for a component. (The max instead of all)

Can use the response of the query with 1 min interval and then get a max value? How can I visualize this in Kibana?

Or will I have to write a custom aggregation in a plugin?

Thanks.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 23, 2020, 8:31pm UTC](https://discuss.elastic.co/t/how-to-get-max-of-10minute-moving-average/234886/2 "2020-06-23T20:31:45Z")

</div>

Do you need it to be the 10 minute _moving_ average, instead of the 10 minute average? Since this is an order of magnitude smaller in terms of the granularity, I believe you could do a 10 minute average over the entire day as well as a 60-minute moving average of 10 minute periods.

---

<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 21, 2020, 8:31pm UTC](https://discuss.elastic.co/t/how-to-get-max-of-10minute-moving-average/234886/3 "2020-07-21T20:31:47Z")

</div>

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