# How do I include other "extended stats" in a data table?

**URL:** <https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124>\
**Category:** Kibana\
**Created:** [February 22, 2017, 11:44pm UTC](https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124 "2017-02-22T23:44:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Frantz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_frantz/32/15787_2.png) [@Brian\_Frantz](https://discuss.elastic.co/u/Brian_Frantz)\
**Post date:** [February 22, 2017, 11:44pm UTC](https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124/1 "2017-02-22T23:44:52Z")

</div>

I'm new to kibana and loving it so far, but I'm stuck on something that I think should be simple but can't figure it out.

I'm creating a Data Table on which I want to order the data by the standard deviation of a particular field (and display it, obviously). Unfortunately, choosing the "standard deviation" metric only seems to show the "standard deviation bounds" upper and lower metrics, which isn't really what I want. The annoying thing is if I look at the API response that kibana received when running my query, I can see that all of the extended stats are there, including the standard deviation, variance, etc. But I can't seem to figure out any way to select these instead to show in a data table or order by them.

Please help! How can I choose from all of the extended stats options on a data table? I was wondering if the JSON Input might get me there, but can't find any documentation on what I can put in this field for this metric.

Thanks!

---

<div class="post-metadata">

**Author:** ![Brian\_Frantz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_frantz/32/15787_2.png) [@Brian\_Frantz](https://discuss.elastic.co/u/Brian_Frantz)\
**Post date:** [February 23, 2017, 12:37am UTC](https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124/2 "2017-02-23T00:37:54Z")

</div>

So I poked around the code and it appears this metric is defined here:

> <https://github.com/elastic/kibana/blob/2f6654bcec1db4f74a673906f5819581b94279ee/src/ui/public/agg_types/metrics/std_deviation.js>

Is adding options for the other extended stats as easy as creating modified copies of this file and adding them to this folder (and rebuilding, etc.)? I couldn't find documentation on writing new metrics, is there someplace I can look for explanation of how these work and how to write my own (otherwise I can just experiment)? Does this one file also handle the sorting behavior for this value? Or is there already a supported way to do what I want?

Thanks!

---

<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:** [February 23, 2017, 3:50pm UTC](https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124/3 "2017-02-23T15:50:40Z")

</div>

This used to be possible, but at some point the Extended Stats metric was replaced with a single Standard Deviation metric which, as you've pointed out, only gives you the bounds.

I've opened an enhancement request to provide this feature. Please add your feedback and +1 here: [https://github.com/elastic/kibana/issues/10533](https://github.com/elastic/kibana/issues/10533)

---

<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:** [March 23, 2017, 3:51pm UTC](https://discuss.elastic.co/t/how-do-i-include-other-extended-stats-in-a-data-table/76124/4 "2017-03-23T15:51:02Z")

</div>

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