# Use Aggreagation on Elastic1.0 RC to calculate porcentage of results

**URL:** https://discuss.elastic.co/t/use-aggreagation-on-elastic1-0-rc-to-calculate-porcentage-of-results/15298
**Category:** Elasticsearch
**Created:** [January 17, 2014, 3:06pm UTC](https://discuss.elastic.co/t/use-aggreagation-on-elastic1-0-rc-to-calculate-porcentage-of-results/15298 "2014-01-17T15:06:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Diego\_Marinho\_de\_Oli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_marinho_de_oli/32/1862_2.png) [@Diego\_Marinho\_de\_Oli](https://discuss.elastic.co/u/Diego_Marinho_de_Oli)
#### Post date: [January 17, 2014, 3:06pm UTC](https://discuss.elastic.co/t/use-aggreagation-on-elastic1-0-rc-to-calculate-porcentage-of-results/15298/1 "2014-01-17T15:06:46Z")

</div>

Hi,

I have a doubt about aggregation in Elasticsearch 1.0.  
Have any way to calculate the porcentage in a aggregation result using  
buckets and scripts?  
I mean, can I use a result of a 2 buckets to do b1/b2, where b1 is the  
total and b2 is the partial result?

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4787dc37-7442-440f-a68e-6236cb45542b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4787dc37-7442-440f-a68e-6236cb45542b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Tiago\_Bockholt](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@Tiago\_Bockholt](https://discuss.elastic.co/u/Tiago_Bockholt)
#### Post date: [January 17, 2014, 8:22pm UTC](https://discuss.elastic.co/t/use-aggreagation-on-elastic1-0-rc-to-calculate-porcentage-of-results/15298/2 "2014-01-17T20:22:26Z")

</div>

Anyone?

Em sexta-feira, 17 de janeiro de 2014 13h06min46s UTC-2, Diego Marinho de  
Oliveira escreveu:

> Hi,
> 
> I have a doubt about aggregation in Elasticsearch 1.0.  
> Have any way to calculate the porcentage in a aggregation result using  
> buckets and scripts?  
> I mean, can I use a result of a 2 buckets to do b1/b2, where b1 is the  
> total and b2 is the partial result?
> 
> Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6413dd2c-4f80-45fb-8227-e484b48f7481%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6413dd2c-4f80-45fb-8227-e484b48f7481%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/use-aggreagation-on-elastic1-0-rc-to-calculate-porcentage-of-results/15298/3 "2017-07-06T01:56:07Z")

</div>


