# How to add condition to y axis and average that in kiabana

**URL:** <https://discuss.elastic.co/t/how-to-add-condition-to-y-axis-and-average-that-in-kiabana/61621>\
**Category:** Kibana\
**Created:** [September 27, 2016, 2:52pm UTC](https://discuss.elastic.co/t/how-to-add-condition-to-y-axis-and-average-that-in-kiabana/61621 "2016-09-27T14:52:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![balubollam](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@balubollam](https://discuss.elastic.co/u/balubollam)\
**Post date:** [September 27, 2016, 2:52pm UTC](https://discuss.elastic.co/t/how-to-add-condition-to-y-axis-and-average-that-in-kiabana/61621/1 "2016-09-27T14:52:23Z")

</div>

Hi everyone,

we have requirement like  
How many entries are "A" from toal entries in given period where entry\_code=(A or B or C)

lets say total count is 100 where entry\_code=(A or B or C)  
and entry\_code="A" count is 6

Now in kibana y axis we need to get  
average = count of entry\_code "A" / count entry\_code (A or B or C)=6/100=0.6

please help me out how we need to caluculate this kind counts in kibana and average them

---

<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:** [September 28, 2016, 9:32pm UTC](https://discuss.elastic.co/t/how-to-add-condition-to-y-axis-and-average-that-in-kiabana/61621/2 "2016-09-28T21:32:26Z")

</div>

This is a repost from github, and suggested there using Timelion: [https://github.com/elastic/kibana/issues/8485#issuecomment-250178](https://github.com/elastic/kibana/issues/8485#issuecomment-250178)

---

<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:** [July 6, 2017, 1:37pm UTC](https://discuss.elastic.co/t/how-to-add-condition-to-y-axis-and-average-that-in-kiabana/61621/3 "2017-07-06T13:37:53Z")

</div>


