# In kibana(5.1.1) in Data Table visualization how can I Use aggregate function like \`(count(\*)/sum)\` for whole bucket?

**URL:** <https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212>\
**Category:** Kibana\
**Created:** [February 7, 2017, 11:27am UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212 "2017-02-07T11:27:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patil-akshay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patil-akshay/32/15295_2.png) [@patil-akshay](https://discuss.elastic.co/u/patil-akshay)\
**Post date:** [February 7, 2017, 11:27am UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212/1 "2017-02-07T11:27:40Z")

</div>

I want print count(\*)/sum(duration) using Data Table visualization for whole bucket how can achieve the same.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 9, 2017, 4:21pm UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212/2 "2017-02-09T16:21:19Z")

</div>

Hi Akshay,

Can you help me understand what you're trying to get a little better? Below I created a Data Table with 2 metrics, Count of docs and Sum of a field, and then I split rows with a Date Histogram. Is this something like what you want except with the Count/Sum?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/1d47ad718eb60740ee1cb5a1c1cd6776b3756078.png)

---

<div class="post-metadata">

**Author:** ![patil-akshay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patil-akshay/32/15295_2.png) [@patil-akshay](https://discuss.elastic.co/u/patil-akshay)\
**Post date:** [February 10, 2017, 3:52am UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212/3 "2017-02-10T03:52:30Z")

</div>

no I want only one column as a output which will contain value of (count divided by sum) here you have two separate columns

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 10, 2017, 2:38pm UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212/4 "2017-02-10T14:38:08Z")

</div>

Is `duration` a field in your data? Can you show a screenshot of what you have now?

---

<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 10, 2017, 2:38pm UTC](https://discuss.elastic.co/t/in-kibana-5-1-1-in-data-table-visualization-how-can-i-use-aggregate-function-like-count-sum-for-whole-bucket/74212/5 "2017-03-10T14:38:12Z")

</div>

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