Cardinality Aggregation across Intervals in TSVB


Hello. I am working with the TSVB to create metric visualizations. I find the TSVB much more configurable than the generic metric visualization, so I’m able to get nicer looking metrics. There is one particular metric that I can’t figure out how to create - an aggregation of cardinality across multiple time series intervals. This type of aggregation is equivalent to the unique count aggregation in the generic metric visualization. Basically I just need a way to aggregate uniqueness across the full time series (defined by the time window for the dashboard or visualization), and not just aggregate uniqueness within each interval/bucket of the time series.

To give an example, I have documents that contain a field with a user ID in it. I want to calculate the number of unique users that are represented in these documents over the full time window of the dashboard (i.e. past 24 hours).

Is there any way to do this? Thanks in advance for the help!

(Matt Bargar) #2

I don't think this is supported at the moment, you can open an enhancement request on our Github repo.

Sort of a hacky workaround, but you could just configure a giant interval and set "Drop Last Bucket" to "No".


Awesome, that worked! I had tried playing with an artificially large interval size but the key ingredient I missed was the “drop last bucket” equal to no. You’re right that it’s a bit hacky but it gets the job done for now. Thank you!

(system) #4

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