# Weighted average kibana

**URL:** <https://discuss.elastic.co/t/weighted-average-kibana/178325>\
**Category:** Kibana\
**Created:** [April 24, 2019, 8:10pm UTC](https://discuss.elastic.co/t/weighted-average-kibana/178325 "2019-04-24T20:10:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katherinne\_Quintero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katherinne_quintero/32/42348_2.png) [@Katherinne\_Quintero](https://discuss.elastic.co/u/Katherinne_Quintero)\
**Post date:** [April 24, 2019, 8:10pm UTC](https://discuss.elastic.co/t/weighted-average-kibana/178325/1 "2019-04-24T20:10:59Z")

</div>

Hello,

I need a visualization of the metric doing a weighted average, in my data I have managements and writing in the field in kibana I calculate the differences between the days in which the income and the administration, the field of accounting, now I need the weighted average of this Contact ability, do I have any way of doing it in Kibana?

I have seen how the query is in the elastic considering the weight, but in my case the weight is the number of times the contact time is repeated and we have not seen how this count can be done in the script field in kibana

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d75e842f70c7a876a99adb0cdee144a12f50b825.png)

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [April 24, 2019, 8:26pm UTC](https://discuss.elastic.co/t/weighted-average-kibana/178325/2 "2019-04-24T20:26:46Z")

</div>

@lukeelmers any thoughts on this?

---

<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:** [May 22, 2019, 8:26pm UTC](https://discuss.elastic.co/t/weighted-average-kibana/178325/3 "2019-05-22T20:26:55Z")

</div>

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