# SUM of two fields?

**URL:** <https://discuss.elastic.co/t/sum-of-two-fields/83958>\
**Category:** Kibana\
**Created:** [April 28, 2017, 2:27am UTC](https://discuss.elastic.co/t/sum-of-two-fields/83958 "2017-04-28T02:27:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sjaak01](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sjaak01](https://discuss.elastic.co/u/Sjaak01)\
**Post date:** [April 28, 2017, 2:27am UTC](https://discuss.elastic.co/t/sum-of-two-fields/83958/1 "2017-04-28T02:27:41Z")

</div>

Hello,

I've got a metric with two metrics, SUM field A and SUM field B. I would like to add another metric that contains the SUM of field A and field B but this data is not in ES (Kibana would need to generate it from field A and B).

Is this possible? I tried doing some JSON but not knowing any programming language that didn't go too well. I'm not even sure if this would be possible using JSON.

---

<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:** [April 28, 2017, 8:00am UTC](https://discuss.elastic.co/t/sum-of-two-fields/83958/2 "2017-04-28T08:00:21Z")

</div>

You should be able to do it with a scripted field - [https://www.elastic.co/guide/en/kibana/5.3/scripted-fields.html](https://www.elastic.co/guide/en/kibana/5.3/scripted-fields.html)

---

<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:** [May 26, 2017, 8:13am UTC](https://discuss.elastic.co/t/sum-of-two-fields/83958/3 "2017-05-26T08:13:26Z")

</div>

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