# Sum of one common value on two fields

**URL:** <https://discuss.elastic.co/t/sum-of-one-common-value-on-two-fields/238877>\
**Category:** Kibana\
**Created:** [June 26, 2020, 2:55pm UTC](https://discuss.elastic.co/t/sum-of-one-common-value-on-two-fields/238877 "2020-06-26T14:55:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamfart](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kamfart](https://discuss.elastic.co/u/kamfart)\
**Post date:** [June 26, 2020, 2:55pm UTC](https://discuss.elastic.co/t/sum-of-one-common-value-on-two-fields/238877/1 "2020-06-26T14:55:16Z")

</div>

Hi there,

I'm trying to build a visualisation which calculates the sum of one specific value across all my documents filtered by 2 fields.

Here some truncated data to illustrate my words :

{  
...  
"class": "A",  
"value": "5",  
"@timestamp": "2020-06-26T13:44:15.741Z",  
"message": "A,5,titi",  
"words": "titi",  
...  
}

{  
...  
"type": "2",  
"value": "5",  
"@timestamp": "2020-06-26T13:46:07.142Z",  
"message": "A,5,titi",  
"words": "titi",  
...  
}

I would like to do :  
sum of value where class = "A" and type = "2" -\> 10

But I don't know which visualisation should I used

If you have any ideas, I will appreciate your help.

Best,  
Kamfart

---

<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 24, 2020, 3:01pm UTC](https://discuss.elastic.co/t/sum-of-one-common-value-on-two-fields/238877/2 "2020-07-24T15:01:53Z")

</div>

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