Skip to content

add cumulative and/or incremental cardinality date histogram #43550

Closed
@LeeDr

Description

@LeeDr

Describe the feature: I've seen several requests in Elasticsearch and Kibana to query for cumulative or incremental cardinality counts over time and it doesn't currently seem possible. Several Elasticsearch developers discussed on Slack for over an hour and didn't really find a solution. Older discuss posts still show up in query results with no solutions.

For example;

date user
2019-06-20 "a"
2019-06-20 "b"
2019-06-20 "c"
2019-06-21 "a"
2019-06-21 "d"

In the above docs, unique count on a daily date histogram buckets would show
2019-06-20 3
2019-06-21 2

But many people want to know new unique visitors to their website from their data. The cumulative values would be;
2019-06-20 3
2019-06-21 4 (because "a" was already counted on the 20th so "d" is new)

Or the incremental values would be;
2019-06-20 3
2019-06-21 1 (1 new unique visitor in this 2 day time span)

One example discuss post; https://discuss.elastic.co/t/how-can-i-get-a-date-histogram-cumulative-cardinality/58067

https://discuss.elastic.co/t/cardinality-over-date-histogram/171373

The next step would be to get Kibana to be able to use this type of aggregation for posts like this;
https://discuss.elastic.co/t/how-to-calculate-daily-new-users-to-a-website/186214

Most cases I've seen people just want the cardinality count. But they could actually want the unique values in some cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions