# Reference line with the median of max values

**URL:** <https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433>\
**Category:** Kibana\
**Tags:** lens\
**Created:** [September 20, 2023, 8:38am UTC](https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433 "2023-09-20T08:38:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpicyS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spicys/32/125743_2.png) [@SpicyS](https://discuss.elastic.co/u/SpicyS)\
**Post date:** [September 20, 2023, 8:38am UTC](https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433/1 "2023-09-20T08:38:10Z")

</div>

Hello,

In kibana lens I would like to know if it is possible to create a reference line layer that show me de median of the max values over time. This way i can compare the current average with the median of max value to see if it is reaching it or not.

I tried it with custom formulas, but they don't accept the statements, I'm also on Kibana 8.8.1

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 20, 2023, 9:19am UTC](https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433/2 "2023-09-20T09:19:45Z")

</div>

Reference line return a single value.  
If I understand correctly you want to have a"dynamical" reference line that adjusts its value for each bucket (i.e. max of each bucket). Have you tried to add a new visualisation layer of line type for that?

---

<div class="post-metadata">

**Author:** ![SpicyS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spicys/32/125743_2.png) [@SpicyS](https://discuss.elastic.co/u/SpicyS)\
**Post date:** [September 20, 2023, 9:29am UTC](https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433/3 "2023-09-20T09:29:09Z")

</div>

Yea, so basicly I created multiple dimensions:

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

Because I wanna monitor if the average (green) exceeds to median of the maximum at that time, this way in a further stadium I can setup rules

---

<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:** [October 18, 2023, 9:29am UTC](https://discuss.elastic.co/t/reference-line-with-the-median-of-max-values/343433/4 "2023-10-18T09:29:34Z")

</div>

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