Lense visualization with reference line based on max count of documents of any interval

v 8.17.3
I have created a lense visualization with horizontal axis as "date histogram" of the field "@timestamp" and vertical axis as "count of records". Together with the filter of the lense i get a nice chart of the counts of records i am interested in. Everything working fine so far.

Now i would like to add a vertical reference line that dynamically shows the value of the maximum "count of records" value of any interval of my initially setup "date histogram" within my chosen data range e.g. "last 24 hours".

Looking at the documentation I thought I should be able to achieve this simply via the function
overall_max(count())
but this only seems to give me the total "count of records" value for the chosen data range. Ignoring the "date histogram" nature of visualization layer.

I searched for a solution for many hours by now, i have no idea why it is not working.

I would very much appreciate if anyone could point me in the right direction with this. Thank you very much.

Hi @david11 Welcome to the community.

I am not sure I am following...

I gather this is not what you are looking for.

I don't know what you mean by a vertical reference line can.. .. can you mock up something?

1 Like

Hi Stephenb, thanks for your reply!

From the value point of view this is what i am looking for. I just liked the styling option of the reference line feature better. Like being able to color above/below. I thought the function that you used in the histogram layer basically is supposed to work via the reference line feature as well. But the reference line does not seem to notice that the histogram layer is present.