# Show Bucket Key, instead of Value for Max/Min Parent Pipeline Aggs in Datatable

**URL:** <https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946>\
**Category:** Kibana\
**Created:** [July 6, 2018, 3:16pm UTC](https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946 "2018-07-06T15:16:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert.j.foreman](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@robert.j.foreman](https://discuss.elastic.co/u/robert.j.foreman)\
**Post date:** [July 6, 2018, 3:16pm UTC](https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946/1 "2018-07-06T15:16:13Z")

</div>

I am using a datatable that splits rows by Term Aggregations. Then, displaying the total Count, as well as multiple Metrics using Max Bucket Sibling Pipeline Aggregations for each row in a datatable. Each of these in turn are using term sub-aggregations. This is working great to show me the number of documents with the most popular term, but I'd also like to see what that term "Is"

Is there a way to display the key to the maximum bucket in the visualization, instead of the value? (or in addition too)?

I don't want to include the term sub-aggregations from the pipeline metrics as another sub-aggregation to the rows, as I don't want to limit all the data in the table to those buckets, and I want display overlapping data as well.

As an example of what I'd like to do:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/a/ba55cdae604075b2a2c6305ad0e7785ae73a1e3c.png)

Here the Highest volume state and dealership are independent aggregation, and only a subset of the whole row. The text strings are the terms that are the keys of the buckets in the term sub-aggregation of the max bucket pipeline aggregation.

I would love to be able to show those strings, but can't figure out how to do so.

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [July 6, 2018, 6:13pm UTC](https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946/2 "2018-07-06T18:13:27Z")

</div>

Hey @robert.j.foreman,

I don't think it's possible to do this. @timroes, can you confirm?

---

<div class="post-metadata">

**Author:** ![robert.j.foreman](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@robert.j.foreman](https://discuss.elastic.co/u/robert.j.foreman)\
**Post date:** [July 19, 2018, 2:04pm UTC](https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946/3 "2018-07-19T14:04:59Z")

</div>

The Max Bucked Sibling Pipeline Aggregation works great to get the number I'm looking for, and when I look at the actual response, I see that the bucket name is exactly what I'm looking for, I just can't access that value in the visualization. It seems that accessing the terms for the Max or Min Buckets would be a very common use case.

---

<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 16, 2018, 2:05pm UTC](https://discuss.elastic.co/t/show-bucket-key-instead-of-value-for-max-min-parent-pipeline-aggs-in-datatable/138946/4 "2018-08-16T14:05:09Z")

</div>

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