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:
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).
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;
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;
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.