# Kibana AVG last hour

**URL:** https://discuss.elastic.co/t/kibana-avg-last-hour/119958
**Category:** Kibana
**Created:** [February 15, 2018, 10:02am UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958 "2018-02-15T10:02:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![User\_2\_Guest\_Incomin](https://avatars.discourse-cdn.com/v4/letter/u/85f322/32.png) [@User\_2\_Guest\_Incomin](https://discuss.elastic.co/u/User_2_Guest_Incomin)
#### Post date: [February 15, 2018, 10:02am UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958/1 "2018-02-15T10:02:29Z")

</div>

Hi there,

I'm trying to create a line chart that shows the average of field1(number field) in the last hour but showing an interval in minutes from field2 (date field), when I try to do with "Date Histogram", field2, interval minutes and using a search of the last 60 minutes it gives me this war:  
 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04d3076afad9eaf9c4d6102b0fb80da3967aa4dd.png)

Then I think it's because it would have 60 buckets and they don't fit, i tried to make a custom interval of 30m for example, and same war apear. It doesn't have any sense for me, I understand if I have a search of the last 60 min, and make a custom interval of 30 minutes like this:  
 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc6776415eb51e0c560cfcea430c2543739eea70.png)  
it should work right?

I want something like this:

 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f3dbbf0757929d615d5b5f5e4cf35b4c90bfc2ff.png)

But X-Axis every minute in the last hour, or 5 min interval and I'm giving up ☹

---

<div class="post-metadata">

### Author: ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)
#### Post date: [February 15, 2018, 4:11pm UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958/2 "2018-02-15T16:11:13Z")

</div>

I have attempted to make this work locally and have not had any luck locally. What are you trying to use this visualization for? Seems like moving average with 1 minute buckets might give you what you are looking for.

---

<div class="post-metadata">

### Author: ![User\_2\_Guest\_Incomin](https://avatars.discourse-cdn.com/v4/letter/u/85f322/32.png) [@User\_2\_Guest\_Incomin](https://discuss.elastic.co/u/User_2_Guest_Incomin)
#### Post date: [February 16, 2018, 1:00pm UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958/3 "2018-02-16T13:00:15Z")

</div>

Ye, I tried to do so, but it didn't work like my boss wanted 😕. Anyway today after few hours we found the problem. When we creat the index on kibana, we select time filter (@timestamp), and that filter works over ALL the others, so finally we decided to creat them without time filter and everything works now with this conf:

 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f01b56a3ff168fff8aed585a34ad8805664bcf58.png)

Thank for your reply!

BTW, ELK it's and amazing tool. Keep the good work!

---

<div class="post-metadata">

### Author: ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)
#### Post date: [February 16, 2018, 2:19pm UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958/4 "2018-02-16T14:19:46Z")

</div>

Glad you got things working and glad you like the stack.

---

<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 16, 2018, 2:20pm UTC](https://discuss.elastic.co/t/kibana-avg-last-hour/119958/5 "2018-03-16T14:20:25Z")

</div>

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