Timelion drawing

I have an index and I wanna create a timelion with a percentage diagram for every month.

(count items where: val>30) / (items where: val<30)

know i have only :
.es(index=rn-da-q-15-es, timefield=final_date, metric=avg:value)

Hey @Yevhen_Baidiuk,

It looks like the divide function is what you need:

.es(index="rn-da-q-15-es",q="val:[30 TO *]").divide(.es(index="rn-da-q-15-es",q="bytes:[* TO 30]"))

Thanks but i need somehow count of results , not values itself
.es(index="rn-da-q-15-es",q="val:[30 TO *]").count().divide . . . ...

I found :

.es(index='rn-da-q-2-es', timefield='final_date', metric=count:value, q='value:[30 TO *]')
.es(index='rn-da-q-2-es', timefield='final_date', metric=count:value)