# Timelion Metric max not showing

**URL:** https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498
**Category:** Kibana
**Created:** [May 17, 2019, 1:53am UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498 "2019-05-17T01:53:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![martin-displayr](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@martin-displayr](https://discuss.elastic.co/u/martin-displayr)
#### Post date: [May 17, 2019, 1:53am UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498/1 "2019-05-17T01:53:19Z")

</div>

For instance look at this. Sum shows up. Max doesn't (neither does min or avg).

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7ce4906c87203ec4a7c0cf3208b34f758d7bf962.png)

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [May 17, 2019, 3:03pm UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498/2 "2019-05-17T15:03:49Z")

</div>

Given that the data looks so peaky and a little synthetic, is it possible that there's only a single document per spike? In that case, max and sum are identical and the lines will overlap exactly.

---

<div class="post-metadata">

### Author: ![martin-displayr](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@martin-displayr](https://discuss.elastic.co/u/martin-displayr)
#### Post date: [May 21, 2019, 12:19am UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498/3 "2019-05-21T00:19:56Z")

</div>

Hi Thomas, that is true. However if I were to take a bigger time range, sum() is going to add up these peaky values. Images below to demonstrate. The top is a 24h chart and the bottom is a 7d chart.

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

---

<div class="post-metadata">

### Author: ![martin-displayr](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@martin-displayr](https://discuss.elastic.co/u/martin-displayr)
#### Post date: [May 21, 2019, 12:24am UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498/4 "2019-05-21T00:24:12Z")

</div>

I just spotted that max() works on the larger ranges.

So my hypothesis is max() refuses to work if there is only 1 item per point, but for 2+ it will take the max.

I.e. in psuedocode, max(50) = null, but max(50,40) = 50 in your code.

Since this isn't really how max() should work, it should work for 1 or more items, I'd characterise this is a bug.

I can workaround this, but this is going to be annoying for anyone with data that might be sparse at point and dense at other points, as you can't have a single chart of that data. I imagine this is a common case.

---

<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: [June 18, 2019, 12:24am UTC](https://discuss.elastic.co/t/timelion-metric-max-not-showing/181498/5 "2019-06-18T00:24:20Z")

</div>

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