# Possibility of doing something like a value\_count agg on doc\_count?

**URL:** <https://discuss.elastic.co/t/possibility-of-doing-something-like-a-value-count-agg-on-doc-count/44642>\
**Category:** Elasticsearch\
**Created:** [March 17, 2016, 2:47am UTC](https://discuss.elastic.co/t/possibility-of-doing-something-like-a-value-count-agg-on-doc-count/44642 "2016-03-17T02:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpattonj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cpattonj/32/4365_2.png) [@cpattonj](https://discuss.elastic.co/u/cpattonj)\
**Post date:** [March 17, 2016, 2:47am UTC](https://discuss.elastic.co/t/possibility-of-doing-something-like-a-value-count-agg-on-doc-count/44642/1 "2016-03-17T02:47:50Z")

</div>

I am trying to determine my power users vs my casual users based on the number of log lines I find their specific user\_id in with respect to other metadata fields that I have logged.

I want to ultimately end up with a list of my user\_id's whose doc\_count exceeds or is beneath a value given by some filters.

Everywhere I've turned so far implies this isn't possible but if I extend out the size of my query manually to include a size like, 'eleventy-bagillion' and capture all of my users I get a doc upper bound error of 0 (implying I now have all of my users and their respective doc\_counts) but surely there must be an easier way to determine this metric than iterating over the result manually checking if doc\_count is \> or \< a value... right? /crosses\_fingers

If not, is this at least in the works?

---

<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 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/possibility-of-doing-something-like-a-value-count-agg-on-doc-count/44642/2 "2017-07-05T23:07:42Z")

</div>


