# Kibana Aggregation Intervals in Data Table (Pivot?)

**URL:** <https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586>\
**Category:** Kibana\
**Created:** [August 22, 2016, 2:28pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586 "2016-08-22T14:28:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael\_hooper](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@michael\_hooper](https://discuss.elastic.co/u/michael_hooper)\
**Post date:** [August 22, 2016, 2:28pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586/1 "2016-08-22T14:28:32Z")

</div>

I've got a bunch of network traffic data that looks like this

```
src | dest | duration (seconds)
----|------|------------------
  a | b | 1.37 
  a | c | 0.44
  b | a | 2.32
  c | b | 1.73

```

I need to divide out this data by src and duration per .5 second interval (anything over 3 can be put in a 3+ column), I don't care about dest. So ideally I'd have a table that has src down the left hand side and duration intervals across the top and the counts of transactions per interval in the cells.

The end result I'm looking will look something like this:

```
src | 0 to .5 | .5 to 1 | 1 to 1.5 | 1.5 to 2 | 2 to 2.5 | 2.5 to 3 | 3+
----|---------|---------|----------|----------|----------|----------|---------
 a | 275 | 120 | 32 | 12 | 4 | 3 | 7
 b | 315 | 105 | 75 | 28 | 16 | 8 | 12
 c | 198 | 113 | 71 | 102 | 173 | 113 | 87

```

Is this basically a pivot table? Is there a way to do that in Kibana? Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [August 22, 2016, 5:37pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586/2 "2016-08-22T17:37:35Z")

</div>

Hi Michael, unfortunately you can't use Kibana to generate a table like that. Here are a couple outstanding request for pivot-table-like functionality, which you can watch for progress:

- [https://github.com/elastic/kibana/issues/5049](https://github.com/elastic/kibana/issues/5049)
- [https://github.com/elastic/kibana/issues/3620](https://github.com/elastic/kibana/issues/3620)

Thanks,  
CJ

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [August 22, 2016, 5:51pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586/3 "2016-08-22T17:51:25Z")

</div>

I talked with @LeeDr a bit about this and it seems like the closest you can get to what you're looking for is a Terms bucket aggregation on your "src" field, and then a Range sub-aggregation on the "duration" field for the different ranges you're interested in.

---

<div class="post-metadata">

**Author:** ![michael\_hooper](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@michael\_hooper](https://discuss.elastic.co/u/michael_hooper)\
**Post date:** [August 22, 2016, 6:05pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586/4 "2016-08-22T18:05:48Z")

</div>

Yeah, unfortunately, that doesn't really get me where I want, I'll still have to pull it into excel and pivot it to get what I'm wanting. The idea is a quick glance to see if there are certain sources that are having a large amount of long transactions. I might be able to get what I want from a heat map plugin I'm looking at. I'm about to start playing around with that, because I just don't see anything that offers a pivot table equivalent in Kibana. Thanks though.

---

<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:** [July 6, 2017, 1:40pm UTC](https://discuss.elastic.co/t/kibana-aggregation-intervals-in-data-table-pivot/58586/5 "2017-07-06T13:40:35Z")

</div>


