# Moving average count based if greater than upper threshold then red color if moving avg count if lower threshold then blue color in kibana formula or vertical bar chart

**URL:** <https://discuss.elastic.co/t/moving-average-count-based-if-greater-than-upper-threshold-then-red-color-if-moving-avg-count-if-lower-threshold-then-blue-color-in-kibana-formula-or-vertical-bar-chart/359938>\
**Category:** Kibana\
**Tags:** timelion, visualisation\
**Created:** [May 21, 2024, 5:50pm UTC](https://discuss.elastic.co/t/moving-average-count-based-if-greater-than-upper-threshold-then-red-color-if-moving-avg-count-if-lower-threshold-then-blue-color-in-kibana-formula-or-vertical-bar-chart/359938 "2024-05-21T17:50:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravisankar123](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Ravisankar123](https://discuss.elastic.co/u/Ravisankar123)\
**Post date:** [May 21, 2024, 5:50pm UTC](https://discuss.elastic.co/t/moving-average-count-based-if-greater-than-upper-threshold-then-red-color-if-moving-avg-count-if-lower-threshold-then-blue-color-in-kibana-formula-or-vertical-bar-chart/359938/1 "2024-05-21T17:50:02Z")

</div>

Moving average count based if greater than upper threshold then red color if moving avg count if lower threshold then blue color in kibana formula or vertical bar chart in kibana

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [November 15, 2024, 2:10pm UTC](https://discuss.elastic.co/t/moving-average-count-based-if-greater-than-upper-threshold-then-red-color-if-moving-avg-count-if-lower-threshold-then-blue-color-in-kibana-formula-or-vertical-bar-chart/359938/2 "2024-11-15T14:10:04Z")

</div>

Hi there, I think that can be achieved with ES|QL.
