# Is this possible with pipeline aggregations

**URL:** <https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867>\
**Category:** Elasticsearch\
**Created:** [April 20, 2018, 11:50am UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867 "2018-04-20T11:50:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jettro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jettro/32/3418_2.png) [@jettro](https://discuss.elastic.co/u/jettro)\
**Post date:** [April 20, 2018, 11:50am UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867/1 "2018-04-20T11:50:58Z")

</div>

Hi, is it possible to create an aggregation that a term aggregation, then use a range or histogram aggregation over the counts of the terms.

Imagine I have docs with clicks by a user. Using the terms aggregation I can get the amount of clicks per user. Now I would like to find the number of users with over a 100 clicks, between 75 and 100 clicks and below 75 clicks for instance.

Does someone know if this is possible?

Regards Jettro

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 27, 2018, 1:43pm UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867/2 "2018-04-27T13:43:27Z")

</div>

Afraid not possible at the moment. There's not a pipeline agg that provides that sort of functionality. You could kinda hack it with multiple terms aggs and a bucket\_selector... but it would be terribly inefficient.

I think you'll have to do the histogramming client side for now. Sorry ☹

---

<div class="post-metadata">

**Author:** ![jettro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jettro/32/3418_2.png) [@jettro](https://discuss.elastic.co/u/jettro)\
**Post date:** [April 27, 2018, 4:32pm UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867/3 "2018-04-27T16:32:21Z")

</div>

Thanks for your reply, Then I can stop searching for doing this in Kibana 😉

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 27, 2018, 6:15pm UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867/4 "2018-04-27T18:15:01Z")

</div>

Happy to (sorta) help 🙂

---

<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 25, 2018, 6:15pm UTC](https://discuss.elastic.co/t/is-this-possible-with-pipeline-aggregations/128867/5 "2018-05-25T18:15:08Z")

</div>

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