# Rollup job with distinct/unique count

**URL:** https://discuss.elastic.co/t/rollup-job-with-distinct-unique-count/215684
**Category:** Elasticsearch
**Created:** [January 20, 2020, 8:11am UTC](https://discuss.elastic.co/t/rollup-job-with-distinct-unique-count/215684 "2020-01-20T08:11:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Matthias\_Seidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthias_seidl/32/60323_2.png) [@Matthias\_Seidl](https://discuss.elastic.co/u/Matthias_Seidl)
#### Post date: [January 20, 2020, 8:11am UTC](https://discuss.elastic.co/t/rollup-job-with-distinct-unique-count/215684/1 "2020-01-20T08:11:27Z")

</div>

Hi,  
I have to aggregate my data daily based on a couple of fields. Most of this can be done easily with the rollup functionality. I can get the max value of a field per day, the count of the logs and other simple aggregations (such as Sum, Min, etc.). But what I'm missing is the unique count functionality.

I have I field "ID" and let's say about 500 000 documents with this field. But there are only 1 000 different IDs per day, and that's the number that I need. So exactly like this unique count functionality, which you can use in any other kibana aggregation.

Is there any way to achieve this?

Thank you so much!

---

<div class="post-metadata">

### Author: ![Matthias\_Seidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthias_seidl/32/60323_2.png) [@Matthias\_Seidl](https://discuss.elastic.co/u/Matthias_Seidl)
#### Post date: [January 23, 2020, 5:49pm UTC](https://discuss.elastic.co/t/rollup-job-with-distinct-unique-count/215684/2 "2020-01-23T17:49:26Z")

</div>

Is there no way to do this?

---

<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: [February 20, 2020, 5:49pm UTC](https://discuss.elastic.co/t/rollup-job-with-distinct-unique-count/215684/3 "2020-02-20T17:49:27Z")

</div>

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