# Anotation on average values in Visual Builder

**URL:** <https://discuss.elastic.co/t/anotation-on-average-values-in-visual-builder/205769>\
**Category:** Kibana\
**Created:** [October 30, 2019, 12:20am UTC](https://discuss.elastic.co/t/anotation-on-average-values-in-visual-builder/205769 "2019-10-30T00:20:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbeg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rbeg/32/56818_2.png) [@rbeg](https://discuss.elastic.co/u/rbeg)\
**Post date:** [October 30, 2019, 12:20am UTC](https://discuss.elastic.co/t/anotation-on-average-values-in-visual-builder/205769/1 "2019-10-30T00:20:10Z")

</div>

Hello,  
In visual builder I use time series to see the average of values over time.  
I want to put anotation if average value is less than an arbitrary value.  
Is it possible to do that in "anotation" ?

For example, I have documents with fields : "name" , "timesamp", "note"  
I show average note over time.  
I want to put anotation with red vertical line if average note is less than 10 for example.

Thank you.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 18, 2019, 3:48pm UTC](https://discuss.elastic.co/t/anotation-on-average-values-in-visual-builder/205769/2 "2019-11-18T15:48:47Z")

</div>

There is no way to do it by default but I think I found a pretty good way to achieve it.

1. Create a rollup job on your data that gets the values for the average. This will create a pretty small index with those values.
2. Add that index as the source for the annotations and set the query as the `name-of-avg-field` \> value.  
Now you should be able to display those lines only when it's larger than that value.

This should be available on Kibana v7.2 and above.

---

<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:** [December 16, 2019, 3:48pm UTC](https://discuss.elastic.co/t/anotation-on-average-values-in-visual-builder/205769/3 "2019-12-16T15:48:54Z")

</div>

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