# Weighted average metric in a Data Table

**URL:** <https://discuss.elastic.co/t/weighted-average-metric-in-a-data-table/179868>\
**Category:** Kibana\
**Created:** [May 7, 2019, 2:19am UTC](https://discuss.elastic.co/t/weighted-average-metric-in-a-data-table/179868 "2019-05-07T02:19:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user80](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@user80](https://discuss.elastic.co/u/user80)\
**Post date:** [May 7, 2019, 2:19am UTC](https://discuss.elastic.co/t/weighted-average-metric-in-a-data-table/179868/1 "2019-05-07T02:19:12Z")

</div>

Hi,

Is there a way to use the weighted\_avg metric within Kibana's Data Table component? Seems like it 'should just work' yet when I edit the Data Table's json to amend the the metric from 'avg' to 'weighted\_avg' together with the relevant field/weight mappings, the Visualization page throws an internal server error.

Thoughts/ideas?

Much appreciated!

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 9, 2019, 3:49am UTC](https://discuss.elastic.co/t/weighted-average-metric-in-a-data-table/179868/2 "2019-05-09T03:49:59Z")

</div>

@user80

the weighted average aggregation is not supported in Kibana afaik. I would submit a feature request for that [https://github.com/elastic/kibana/issues/new](https://github.com/elastic/kibana/issues/new)

This could also be achieved with bucket scripts, but this too is an outstanding improvement for Kibana [https://github.com/elastic/kibana/issues/4707](https://github.com/elastic/kibana/issues/4707)

---

<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:** [June 6, 2019, 3:50am UTC](https://discuss.elastic.co/t/weighted-average-metric-in-a-data-table/179868/3 "2019-06-06T03:50:04Z")

</div>

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