# Calculating the Sum of Count metric in Kibana

**URL:** <https://discuss.elastic.co/t/calculating-the-sum-of-count-metric-in-kibana/112152>\
**Category:** Kibana\
**Created:** [December 18, 2017, 5:57am UTC](https://discuss.elastic.co/t/calculating-the-sum-of-count-metric-in-kibana/112152 "2017-12-18T05:57:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhil\_Kintali](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Akhil\_Kintali](https://discuss.elastic.co/u/Akhil_Kintali)\
**Post date:** [December 18, 2017, 5:57am UTC](https://discuss.elastic.co/t/calculating-the-sum-of-count-metric-in-kibana/112152/1 "2017-12-18T05:57:51Z")

</div>

{"Username": A, "Condition":92, "Severity":32}  
{"Username": A, "Condition":89, "Severity":65}  
{"Username": B, "Condition":92, "Severity":60}  
{"Username": B, "Condition":21, "Severity":53}  
{"Username": B, "Condition":33, "Severity":65}  
{"Username": C, "Condition":94, "Severity":60}  
{"Username": C, "Condition":10, "Severity":65}

Above is a sample of my output. How can I get the count of the Usernames A & B? How can I get the count of only Username C?

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [December 19, 2017, 11:31am UTC](https://discuss.elastic.co/t/calculating-the-sum-of-count-metric-in-kibana/112152/2 "2017-12-19T11:31:44Z")

</div>

if you want to get the count of all usernames:

- create a table visualization
- as a metric choose `Count` (already chosen by default)
- in the bucket aggregation part select the Term aggregation (for splitting rows) and choose the username field

this will produce result like

```auto
 username | count
 A | 10
 B | 12
 C | 30

```

now if you want to show only user A, just click on `A` and it will filter only on that user  
you will see a filter added to the filter panel on the top, you can click that filter and EDIT it

in the edit mode you will see something like `username` `is` `A`  
you could change the `is` to `is one of` and enter `A`, `B` to the value field and you will get only the users A and B.

let me know if this helps.

regards, Peter

---

<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 16, 2018, 11:31am UTC](https://discuss.elastic.co/t/calculating-the-sum-of-count-metric-in-kibana/112152/3 "2018-01-16T11:31:46Z")

</div>

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