# How to generate a porcetage of 2 query

**URL:** <https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910>\
**Category:** Elasticsearch\
**Created:** [January 18, 2018, 1:59pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910 "2018-01-18T13:59:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedrofigueiredo](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/pedrofigueiredo/32/2389_2.png) [@pedrofigueiredo](https://community.grafana.com/u/pedrofigueiredo)\
**Post date:** [January 18, 2018, 1:59pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/1 "2018-01-18T13:59:42Z")

</div>

Follow the image explain my issue, I would like generate a porcetage of errors , I have the total and totalErrors in each query , how to generate the porcentage.

 ![ISSUE](https://us1.discourse-cdn.com/grafana/original/2X/b/bc309fb33fa46e69110144b80f22abced8130f08.PNG)

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [January 18, 2018, 2:50pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/2 "2018-01-18T14:50:20Z")

</div>

Hi,

_divideSeries_ as you’re using are specific for the Graphite data source and will not work with elasticsearch. The only option you have is if you’re able to generate percentage of errors using one query. If I’m not remember incorrectly there are feature requests regarding this over at Grafana github repo.

Marcus

---

<div class="post-metadata">

**Author:** ![pedrofigueiredo](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/pedrofigueiredo/32/2389_2.png) [@pedrofigueiredo](https://community.grafana.com/u/pedrofigueiredo)\
**Post date:** [January 18, 2018, 3:09pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/3 "2018-01-18T15:09:50Z")

</div>

Tks Marcus .

Do you know how Can I make this in one query ?

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [January 18, 2018, 3:17pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/4 "2018-01-18T15:17:13Z")

</div>

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

Refer to this [issue](https://github.com/grafana/grafana/issues/8029). That issue referencing this [issue](https://github.com/grafana/grafana/issues/3677) whch in turn talks about a meta queries plugin, see [comment](https://github.com/grafana/grafana/issues/3677#issuecomment-338883295), that maybe can help you (I haven’t tried it).

Marcus

---

<div class="post-metadata">

**Author:** ![pedrofigueiredo](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/pedrofigueiredo/32/2389_2.png) [@pedrofigueiredo](https://community.grafana.com/u/pedrofigueiredo)\
**Post date:** [January 18, 2018, 3:31pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/5 "2018-01-18T15:31:12Z")

</div>

Follow bellow , my solution for this problem ![solution](https://us1.discourse-cdn.com/grafana/original/2X/6/6b55c9dca8708f106e33ef49863f002d6767e251.PNG)

---

<div class="post-metadata">

**Author:** ![tiagocruz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/tiagocruz/32/6335_2.png) [@tiagocruz](https://community.grafana.com/u/tiagocruz)\
**Post date:** [March 14, 2019, 3:11pm UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/6 "2019-03-14T15:11:30Z")

</div>

Hello @pedrofigueiredo,

can you please show how you did this?  
thanks!!

---

<div class="post-metadata">

**Author:** ![shashidtj](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@shashidtj](https://community.grafana.com/u/shashidtj)\
**Post date:** [October 23, 2020, 9:29am UTC](https://community.grafana.com/t/how-to-generate-a-porcetage-of-2-query/4910/7 "2020-10-23T09:29:03Z")

</div>

@pedrofigueiredo can you please share your resolution as i’m unable to achieve the same.  
Also as per other threads seems like it’s not feasible with elascticsearch. Can you please explain.
