# Aggregation comprising of multiple fields

**URL:** <https://discuss.elastic.co/t/aggregation-comprising-of-multiple-fields/41708>\
**Category:** Elasticsearch\
**Created:** [February 14, 2016, 4:17am UTC](https://discuss.elastic.co/t/aggregation-comprising-of-multiple-fields/41708 "2016-02-14T04:17:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohitkumarbhagat](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rohitkumarbhagat](https://discuss.elastic.co/u/rohitkumarbhagat)\
**Post date:** [February 14, 2016, 4:17am UTC](https://discuss.elastic.co/t/aggregation-comprising-of-multiple-fields/41708/1 "2016-02-14T04:17:25Z")

</div>

Is there a way to find aggregated values based on more than one fields for example average of difference of two integer fields of a document?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 15, 2016, 7:22pm UTC](https://discuss.elastic.co/t/aggregation-comprising-of-multiple-fields/41708/2 "2016-02-15T19:22:52Z")

</div>

I don't believe there is at this stage.

---

<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 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/aggregation-comprising-of-multiple-fields/41708/3 "2017-07-05T23:16:16Z")

</div>


