# Visualize count of unique identities over time

**URL:** <https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647>\
**Category:** Kibana\
**Created:** [March 26, 2018, 4:47pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647 "2018-03-26T16:47:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)\
**Post date:** [March 26, 2018, 4:47pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647/1 "2018-03-26T16:47:57Z")

</div>

Hi, each document in my index has an author id and a date. I would like to create a bar chart in kibana where I for each month can see how many new authors have contributed. I imagine it would look something like this:

 ![Unique%20editors](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fb65a4f11aa07831b0f1aed4d67bdf25c4958761.jpg)

I tried using a histogram with unique counts but then I get the unique count for that particular bucket. I want the unique count in the bucket that has not appeared earlier (by date).

Is this possible and how would I go about it?

Best regards,  
Mattias

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 26, 2018, 9:42pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647/2 "2018-03-26T21:42:10Z")

</div>

I've seen this question before and unfortunately I don't think there's a good answer.

One possible way, although it looks quite ugly, is to do your Unique Count metric, and then to `Split Chart` instead of `Split rows`. I _think_ it's doing what you want but looks terrible;

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e58bf14a68080d82130f2ca23bff684165843cc.png)

You could click the little arrow under the visualization to open the "spy panel" and look at the results to see if it looks like it's doing the right thing;

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

Here's another long post where we tried to get the same thing (and failed);

> [@Cumulative Sum regardless of time interval](https://discuss.elastic.co/t/cumulative-sum-regardless-of-time-interval/96677/17):
>
> Hi Chris I feel it's up to how people are defining cusum. For me it could be a cumulative number based on the whole time series. It equals to sum an auto date histogram of a certain metric from begging of the specified timefield until now and when date range filter is applied, it's just slice a piece of data from timeline instead of re-calculate it based on the date range filter. There might be needs for both cases, I just hope if kibana team could add a variable in cusum function to make both …

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)\
**Post date:** [March 26, 2018, 10:48pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647/3 "2018-03-26T22:48:40Z")

</div>

Ok, thanks for your answer. In my randomized quest for better solutions I might have stumbled upon something.

I did the following:

**Y-Axis**  
Min bucket aggregation.  
Bucket: Date Histogram  
Field: Date  
Inteval: Custom 5y

Metric:  
Aggregation: Unique Count  
Field: Author Id

**X-Axis**  
Aggregation: Date Histogram  
Field: Date  
Inteval: Monthly

The reason I tried this is that it seemed similar to the a query I knew would solve the problem. If I could group the documents by Author Id, select the min date and plot a date histogram I would have the solution.

I do not know exactly what I have done in my visualization 🙂 but the results seems very similar to what I want. I have not yet verified it.

What are your thoughts on this?

Best regards,  
Mattias

---

<div class="post-metadata">

**Author:** ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)\
**Post date:** [March 26, 2018, 10:55pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647/4 "2018-03-26T22:55:55Z")

</div>

Pretty sure it was only due to randomness and wishful thinking that I got the result I was looking for.

---

<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:** [April 23, 2018, 10:56pm UTC](https://discuss.elastic.co/t/visualize-count-of-unique-identities-over-time/125647/5 "2018-04-23T22:56:02Z")

</div>

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