# Kibana field \_count

**URL:** <https://discuss.elastic.co/t/kibana-field--count/42552>\
**Category:** Kibana\
**Created:** [February 24, 2016, 5:09am UTC](https://discuss.elastic.co/t/kibana-field--count/42552 "2016-02-24T05:09:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![binurajps](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@binurajps](https://discuss.elastic.co/u/binurajps)\
**Post date:** [February 24, 2016, 5:09am UTC](https://discuss.elastic.co/t/kibana-field--count/42552/1 "2016-02-24T05:09:33Z")

</div>

Hello Team,

Please find the below scenario.

I have field like Booking\_Source, this field have value like as below

Booking\_Source : AXS  
Booking\_Source : INF  
Booking\_Source : APL

How to get the count of Booking\_Source field. Here is the count of Booking\_Source this filed is 3. How to get that count using JSON script in Kibana.

Regards,  
Binuraj

---

<div class="post-metadata">

**Author:** ![stormpython](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stormpython/32/7190_2.png) [@stormpython](https://discuss.elastic.co/u/stormpython)\
**Post date:** [February 24, 2016, 5:44pm UTC](https://discuss.elastic.co/t/kibana-field--count/42552/2 "2016-02-24T17:44:27Z")

</div>

If you are just doing a search, you can enter this in the Kibana search bar:

```auto
Booking_Source: *

```

This will return all documents with a Booking\_Source field. The count of all the documents is the value you are looking for, which will be the default for any visualization in the `Visualize` tab.

---

<div class="post-metadata">

**Author:** ![binurajps](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@binurajps](https://discuss.elastic.co/u/binurajps)\
**Post date:** [February 25, 2016, 4:19am UTC](https://discuss.elastic.co/t/kibana-field--count/42552/3 "2016-02-25T04:19:26Z")

</div>

Thank you for your reply.

But I am checking "How to get that count using JSON script in Kibana." ?

---

<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:** [February 25, 2016, 6:03pm UTC](https://discuss.elastic.co/t/kibana-field--count/42552/4 "2016-02-25T18:03:05Z")

</div>

Hi Binuraj,

You don't have to use JSON to get the count in Kibana. You can just use the GUI to select the fields you want and the types of aggregations and Kibana does the JSON for you.

In this screenshot I got the count of each response code;

 ![](https://us1.discourse-cdn.com/elastic/original/2X/7/70e86a3b3837efcb2b6b5bbd84ecfdeddbb4fbe5.png)

And in this screenshot I got the count of unique response codes (3 different codes);

![](https://us1.discourse-cdn.com/elastic/original/2X/c/c2dc5e8b095d388590fb70e8fc538150e573a5f6.png)

If you click the up arrow at the bottom of the chart you can then click on the Request button to see the JSON of the query that Kibana sent to Elasticsearch.

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 6, 2017, 2:01pm UTC](https://discuss.elastic.co/t/kibana-field--count/42552/5 "2017-07-06T14:01:09Z")

</div>


