Arithmetical operations on multiple queries from Elastic Search data sources -

I have two ES indexes configured as Grafana data sources. In a dashboard table, I have to use both data sources ( --mixed-- ) to take out certain fields from both indexes and apply percentage calculation on fields. Could someone please suggest how it can be done in latest Grafana version i.e. 5.4.3.