# Create Data table with different counts in columns

**URL:** <https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753>\
**Category:** Kibana\
**Created:** [November 30, 2017, 1:21pm UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753 "2017-11-30T13:21:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sartaj\_Ahmed](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@Sartaj\_Ahmed](https://discuss.elastic.co/u/Sartaj_Ahmed)\
**Post date:** [November 30, 2017, 1:21pm UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/1 "2017-11-30T13:21:38Z")

</div>

I am trying to display 3 columns, One is total count other is pass count and the third is fail count

I can differntiate pass and fail request as follows:

If description contains 200. ie., @description : (+httpCode +200) then its pass else fail.

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

---

<div class="post-metadata">

**Author:** ![Sartaj\_Ahmed](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@Sartaj\_Ahmed](https://discuss.elastic.co/u/Sartaj_Ahmed)\
**Post date:** [December 1, 2017, 11:54am UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/2 "2017-12-01T11:54:09Z")

</div>

Any help moderators ?

---

<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:** [December 1, 2017, 10:24pm UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/3 "2017-12-01T22:24:26Z")

</div>

Hi Sartaj,

Here I created a Data Table visualization and I used the Filters aggregation. I have 3 filters with the last one being blank and so that gives the total `*` count but you can delete that with the `X`.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/87cb7417b3f4d8a565f30ac265df5c9ab7171123.png)

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![Sartaj\_Ahmed](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@Sartaj\_Ahmed](https://discuss.elastic.co/u/Sartaj_Ahmed)\
**Post date:** [December 2, 2017, 9:41am UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/4 "2017-12-02T09:41:32Z")

</div>

> [@Sartaj\_Ahmed](#):
>
> If description contains 200. ie., @description : (+httpCode +200) then its pass else fail.

Thanks a lot for reply @LeeDr , 🙂

The Solution you have provided is really good.However, I have a doubt over here

The filter you have used is based on "response" which is a search parameter. But in my case its part of a parameter called description.

ie., @description contains the status code as " (httpCode : 200) " . So generally I use it as :

@description : (+httpCode +200) .

So the log group is "/aws/lambda/laaslicenseservice/CommonTestCO" which has a paramter @ description

Can you please tell me how can I include it in the filter ?

---

<div class="post-metadata">

**Author:** ![Sartaj\_Ahmed](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@Sartaj\_Ahmed](https://discuss.elastic.co/u/Sartaj_Ahmed)\
**Post date:** [December 18, 2017, 7:31am UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/5 "2017-12-18T07:31:02Z")

</div>

Any inputs, Anyone?

---

<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:** [January 3, 2018, 11:03pm UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/6 "2018-01-03T23:03:27Z")

</div>

In my example, "response" is the name of a field in my index. In your case the field name you're interested in is @description so I think you can still do the filter the same way I did but instead use  
`@description:(+httpCode +200)`

Did you try it? Did it not work?

---

<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 31, 2018, 11:03pm UTC](https://discuss.elastic.co/t/create-data-table-with-different-counts-in-columns/109753/7 "2018-01-31T23:03:34Z")

</div>

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