How to generate a porcetage of 2 query

No. Out of the box I don’t think you can do that with elasticsearch and Grafana.

Refer to this issue. That issue referencing this issue whch in turn talks about a meta queries plugin, see comment, that maybe can help you (I haven’t tried it).

Marcus