# How to use scripted metric aggregation in kibana

**URL:** <https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605>\
**Category:** Kibana\
**Created:** [October 5, 2015, 4:59am UTC](https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605 "2015-10-05T04:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaibhavy](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vaibhavy](https://discuss.elastic.co/u/vaibhavy)\
**Post date:** [October 5, 2015, 4:59am UTC](https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605/1 "2015-10-05T04:59:35Z")

</div>

I was working on an example given in the following link:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html)

I have gotten the script working, now am trying to use the scripted metric aggregation in kibana and but am unable to find any working tutorial on the same, would really appreciate some pointers as to how I can display the scripted metric aggregation(saved in ES), in kibana?

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [October 5, 2015, 1:40pm UTC](https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605/2 "2015-10-05T13:40:00Z")

</div>

Scripted metrics aggregation is not supported directly from Kibana today:

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

---

<div class="post-metadata">

**Author:** ![Jeremy\_Colton](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jeremy\_Colton](https://discuss.elastic.co/u/Jeremy_Colton)\
**Post date:** [July 11, 2016, 9:57am UTC](https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605/3 "2016-07-11T09:57:01Z")

</div>

Hi @tbragin, if we cannot visualize the result of a scripted\_metric aggregation in Kibana, what is its intended use?

---

<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:47pm UTC](https://discuss.elastic.co/t/how-to-use-scripted-metric-aggregation-in-kibana/31605/4 "2017-07-06T13:47:24Z")

</div>


