# Get average of daily count in Kibana Data Table visualization

**URL:** <https://discuss.elastic.co/t/get-average-of-daily-count-in-kibana-data-table-visualization/138744>\
**Category:** Kibana\
**Created:** [July 5, 2018, 2:15pm UTC](https://discuss.elastic.co/t/get-average-of-daily-count-in-kibana-data-table-visualization/138744 "2018-07-05T14:15:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chetang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chetang/32/3451_2.png) [@chetang](https://discuss.elastic.co/u/chetang)\
**Post date:** [July 5, 2018, 2:15pm UTC](https://discuss.elastic.co/t/get-average-of-daily-count-in-kibana-data-table-visualization/138744/1 "2018-07-05T14:15:58Z")

</div>

Hi,  
I want to get average of daily inventory count per category in data table visualization.  
Below is a simple case where we have an inventory of two categories of items.  
Blank in out date means it's still in inventory

ID | Category | In date | Out date  
01 | A | 2018/07/01 | 2018/07/03  
02 | A | 2018/07/01 | 2018/07/05  
03 | A | 2018/07/03 | 2018/07/04  
04 | A | 2018/07/03 |  
05 | A | 2018/07/04 | 2018/07/05  
06 | A | 2018/07/05 |  
07 | B | 2018/07/01 | 2018/07/02  
08 | B | 2018/07/01 | 2018/07/05  
09 | B | 2018/07/03 | 2018/07/05  
10 | B | 2018/07/04 |  
11 | B | 2018/07/04 | 2018/07/05  
12 | B | 2018/07/04 |

I am able to get below data table visualisation  
Category | Date | Count  
A | 2018/07/01 | 2  
A | 2018/07/02 | 2  
A | 2018/07/03 | 3  
A | 2018/07/04 | 3  
A | 2018/07/05 | 2  
B | 2018/07/01 | 2  
B | 2018/07/02 | 1  
B | 2018/07/03 | 2  
B | 2018/07/04 | 5  
B | 2018/07/05 | 2

But I want to get average of daily inventory count as shown below.

Category | Average  
A | 2.4  
B | 2.4

How can I get this in data-table?

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [July 5, 2018, 3:05pm UTC](https://discuss.elastic.co/t/get-average-of-daily-count-in-kibana-data-table-visualization/138744/2 "2018-07-05T15:05:31Z")

</div>

You should be able to choose the "Average Bucket" metric under "Sibling pipeline aggregations" and then choose a term aggregation on the category field.

---

<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:** [August 2, 2018, 3:05pm UTC](https://discuss.elastic.co/t/get-average-of-daily-count-in-kibana-data-table-visualization/138744/3 "2018-08-02T15:05:39Z")

</div>

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