How to divide two doc_count values in aggregations

I want to perform division between two doc_count values of unique fields obtained through "terms" bucket aggregation. Is there a way to do that?

This can be achieved by using the Math aggregation in TSVB.

The math aggregation in my TSVB is disabled. Any idea on how to enable that?

The math aggregation works only after you have another aggregation in the series. So configure the others first and then you can add the Math one.

There are a few videos that walk you through TSVB:

Thank you for the reply. I am doing a filter using the "match_phrase" on a field. I hard-coded the value on which the filter works. is there a way that this value can be obtained from the user?. thanks in advance.

I have log data with 4 version numbers. I aggregated these into 4 buckets using terms aggrgation. Now I want a graph for the proportion of each version. How do I get the overall count of the logs to perform (count of documents in each bucket/count of all logs) in TSVB? essentially, how to do the sum on doc_count of terms aggregation in TSVB?

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