# Incorrect max value on long time spans

**URL:** <https://discuss.elastic.co/t/incorrect-max-value-on-long-time-spans/239389>\
**Category:** Kibana\
**Created:** [July 1, 2020, 2:13am UTC](https://discuss.elastic.co/t/incorrect-max-value-on-long-time-spans/239389 "2020-07-01T02:13:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sjaak01](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sjaak01](https://discuss.elastic.co/u/Sjaak01)\
**Post date:** [July 1, 2020, 2:13am UTC](https://discuss.elastic.co/t/incorrect-max-value-on-long-time-spans/239389/1 "2020-07-01T02:13:20Z")

</div>

Hi,

I'm collecting network traffic and I need to find the maximum bytes per second value over a certain span of time. The visualization doesn't matter but for now I'm using this timelion query.

```
$query='location:12345678', .es($query,metric='sum:out_bytes').mvavg(1m).scale_interval(1s),
$query='location:12345678', .es($query,metric='sum:out_bytes').mvavg(1m).scale_interval(1s).aggregate(max)

```

The problem with this query is that the result is incorrect over longer spans of time. E.g. if I pick the last 24 hours it might show 1Mbps but if I pick last 7 days it will go down to 500Kbps as the max value.

I think this is because the limited amount of buckets, so spikes get filtered out. Is there a way to get the absolute max bps value over a certain amount of time? It doesn't have to be timelion.

---

<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 29, 2020, 2:13am UTC](https://discuss.elastic.co/t/incorrect-max-value-on-long-time-spans/239389/2 "2020-07-29T02:13:23Z")

</div>

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