# Count of two fields

**URL:** <https://discuss.elastic.co/t/count-of-two-fields/89893>\
**Category:** Kibana\
**Created:** [June 19, 2017, 7:37am UTC](https://discuss.elastic.co/t/count-of-two-fields/89893 "2017-06-19T07:37:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tal\_Shemesh](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@Tal\_Shemesh](https://discuss.elastic.co/u/Tal_Shemesh)\
**Post date:** [June 19, 2017, 7:37am UTC](https://discuss.elastic.co/t/count-of-two-fields/89893/1 "2017-06-19T07:37:58Z")

</div>

Hi,  
I have events of all the request coming to a lots of domains.  
I would like to create a visualization of domain and the count of 200 / 204 status responses  
as a table with 3 columns

is there a way to do that with Kibana?

also, is there a way to create a ratio as a 4th column?

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [June 19, 2017, 6:33pm UTC](https://discuss.elastic.co/t/count-of-two-fields/89893/2 "2017-06-19T18:33:54Z")

</div>

The first thing you can try is a Data Table visualization and just do a terms aggregation on your response field like this;

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/3/33a35a603e21294a8702302dab68e319ee08ceb7.png)

Another option is to add filters for each response you want to include, and you can defined the custom label like I did for just one of them;

 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/2/8260f9dddd4adc0711845dcb738734110f222b9e.png)

You can add a total here too, but I don't see a way to sort the rows;

 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8f9759ef21e3c5395abb72050f815b810f7ad67f.png)

I don't think there's a way to have the ration as a 4th column or row.

Does this help?

Regards,  
Lee

---

<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 17, 2017, 6:34pm UTC](https://discuss.elastic.co/t/count-of-two-fields/89893/3 "2017-07-17T18:34:31Z")

</div>

Closed on July 17, 2017, 6:34pm UTC

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