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

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

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