# bucketScript in kibana

**URL:** <https://discuss.elastic.co/t/bucketscript-in-kibana/53181>\
**Category:** Kibana\
**Created:** [June 17, 2016, 6:10pm UTC](https://discuss.elastic.co/t/bucketscript-in-kibana/53181 "2016-06-17T18:10:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharat](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bharat](https://discuss.elastic.co/u/bharat)\
**Post date:** [June 17, 2016, 6:10pm UTC](https://discuss.elastic.co/t/bucketscript-in-kibana/53181/1 "2016-06-17T18:10:31Z")

</div>

I am using Kibana 4.5, I need to execute the {"script": "\_value\*uniqueCount"} on Average Aggregrator Metric. where uniqueCount is an agg to get the unique count of another field. I came to know this can be solved using bucketScript Aggregation/Pipeline Aggregation. But I dont know, how to execute in Kibana JSONInput

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [June 17, 2016, 8:12pm UTC](https://discuss.elastic.co/t/bucketscript-in-kibana/53181/2 "2016-06-17T20:12:21Z")

</div>

Unfortunately, this isn't something currently supported by Kibana. You can add your +1 and feedback to the enhancement requests here:

> <https://github.com/elastic/kibana/issues/4584>

> <https://github.com/elastic/kibana/issues/2646>

---

<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, 1:50pm UTC](https://discuss.elastic.co/t/bucketscript-in-kibana/53181/3 "2017-07-06T13:50:04Z")

</div>


