# Scripted field with count value

**URL:** <https://discuss.elastic.co/t/scripted-field-with-count-value/148578>\
**Category:** Kibana\
**Created:** [September 14, 2018, 7:59am UTC](https://discuss.elastic.co/t/scripted-field-with-count-value/148578 "2018-09-14T07:59:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Angel\_Chuecos](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Miguel\_Angel\_Chuecos](https://discuss.elastic.co/u/Miguel_Angel_Chuecos)\
**Post date:** [September 14, 2018, 7:59am UTC](https://discuss.elastic.co/t/scripted-field-with-count-value/148578/1 "2018-09-14T07:59:46Z")

</div>

I need to do a list visualization in Kibana that use a count metric.

It allows me to know if any record has a value that is repeated.

The problem is that I can not use that metric because it is not a field but I want to use it to filter in the table and if the value is\> 1 it does not appear.

Is it possible to create a scripted field that allows you to make a count of a field?

---

<div class="post-metadata">

**Author:** ![elastock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elastock/32/35672_2.png) [@elastock](https://discuss.elastic.co/u/elastock)\
**Post date:** [September 14, 2018, 8:19am UTC](https://discuss.elastic.co/t/scripted-field-with-count-value/148578/2 "2018-09-14T08:19:11Z")

</div>

I don't understand exactly what you want to do .

You want to know if X documents have a field with the same value ?

---

<div class="post-metadata">

**Author:** ![Miguel\_Angel\_Chuecos](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Miguel\_Angel\_Chuecos](https://discuss.elastic.co/u/Miguel_Angel_Chuecos)\
**Post date:** [September 14, 2018, 8:20am UTC](https://discuss.elastic.co/t/scripted-field-with-count-value/148578/3 "2018-09-14T08:20:54Z")

</div>

Exactly, If there are 10 documents. These documents have a field called FollowId with a string value.  
I want to use a count metric but stored in a field to use it in a list/table visualization.

---

<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:** [October 12, 2018, 8:20am UTC](https://discuss.elastic.co/t/scripted-field-with-count-value/148578/4 "2018-10-12T08:20:59Z")

</div>

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