# Elasticsearch aggregation sum

**URL:** <https://discuss.elastic.co/t/elasticsearch-aggregation-sum/213100>\
**Category:** Elasticsearch\
**Created:** [December 26, 2019, 4:24pm UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-sum/213100 "2019-12-26T16:24:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joy\_Salomon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joy_salomon/32/60002_2.png) [@Joy\_Salomon](https://discuss.elastic.co/u/Joy_Salomon)\
**Post date:** [December 26, 2019, 4:24pm UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-sum/213100/1 "2019-12-26T16:24:00Z")

</div>

I'm trying to sum revenue from orders, But the **results are** in float **.6299743652344**

Any idea why?

Field in data is .00

("grand\_total": 84.5)

s = Search(using=ES, index='orders')  
s = s[:0]  
s.aggs.metric('rev', 'sum', field='grand\_total')  
res = s.execute()  
return res.aggs.rev.value

result: `Response: {'rev': {'value': 3195.6299743652344}}`

> <https://stackoverflow.com/questions/59457221/python-elasticsearch-dsl-aggregations-sum-return-float-result>

---

<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:** [January 23, 2020, 4:24pm UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-sum/213100/2 "2020-01-23T16:24:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
