# Multi value field count in Kibana 4

**URL:** <https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409>\
**Category:** Kibana\
**Created:** [June 11, 2015, 6:14am UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409 "2015-06-11T06:14:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darpan205](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darpan205/32/3548_2.png) [@Darpan205](https://discuss.elastic.co/u/Darpan205)\
**Post date:** [June 11, 2015, 6:14am UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409/1 "2015-06-11T06:14:39Z")

</div>

Hi Guys,

Can Kibana tokenize multi value fields and give us the count for those fields?  
Is it even possible with ElasticSearch?

For example I have the following fields in my ES doc,  
{  
"\_index" : "twitter",  
"\_type" : "tweet",  
"\_id" : "1",  
"tags" : ["18th", "nofilter","bday"],  
"\_version" : 1,  
"created" : true  
}  
{  
"\_index" : "twitter",  
"\_type" : "tweet",  
"\_id" : "2",  
"tags" : ["it", "5yrs"],  
"\_version" : 1,  
"created" : true  
}

So if I want to have count report on tags field then it should give me 5. 3 for the 1st document and 2 for the 2nd document.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 13, 2015, 4:55am UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409/2 "2015-06-13T04:55:33Z")

</div>

Don't think so, you'd probably need to script this sort of calculation.

---

<div class="post-metadata">

**Author:** ![Darpan205](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darpan205/32/3548_2.png) [@Darpan205](https://discuss.elastic.co/u/Darpan205)\
**Post date:** [June 15, 2015, 10:12am UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409/3 "2015-06-15T10:12:37Z")

</div>

Hi Mark,

Thanks for your reply, but I am stuck on another issue,  
How can we call ES script from Kibana? I have created 1-2sample groovy scripts in ES now I want to call those scripts from Kibana but unable to find a way to do so..!!

Any thoughts?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2015, 10:10pm UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409/4 "2015-06-15T22:10:50Z")

</div>

You can create scripted fields in KB itself, but don't think you can call ES scripts from KB.

---

<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:18pm UTC](https://discuss.elastic.co/t/multi-value-field-count-in-kibana-4/2409/5 "2017-07-06T14:18:09Z")

</div>


