Visual Builder Can't use overall aggregation as input to another aggregation

I am dealing with data regarding user success rates for performing different tasks. What I'd like to do is use the experimental visualization builder to create a metric visualization. I use a calculation aggregation to sum the number of success across all dates in range with the corresponding number of failures and then have that divide the number of successes to get a success rate. Just using the sum aggregation only allows me to use the data from the last day. I want to then use an overall sum to sum each of the days totals together so that I can get an accurate success rate. However, I can't then use that overall sum as an input to the aforementioned sum aggregation.

hi @clowder,

you are referring to the Time Series Visual Builder?

What are you trying to express? Do you want to see that success-rate over time? I'm not sure if I fully understand the use case, but you might be able to do this with Timelion. It allows you to divide two time-series, to get the success-rate.

I'd suggest to look at the docs first, since this may get your there:

Thanks for the reply @thomasneirynck,

Yes I am referring to the Time Series Builder. What I'd like is to have a metric visualization (just a big bold number) that is the percentage success rate for all users. Let's say on Monday John tried to do task X 20 times and failed 10 times, thus succeeding 10 time. Marry then tried X 40 times on Tuesday and failed 5 times, succeeding 35 times. I want to be able to display on my dashboard that over Monday and Tuesday the success rate for X was (35 + 10)/(10+10 + 5+35) = 75%. Timelion wouldn't work because, as I understand it, it produces time series. I don't need a time series. I want to ask questions like what was the success rate for task X over the last two years. I can already graph the success rate as a time series. I just want to be able to do what I described. It seems to me this should be a fairly common use case.

thanks @clowder,

I see, that's harder... :wink:

Doing a division like that on the fly isn't possible, neither with TSVB or the regular metrics in Visualize.

Could you create an enhancement request in Kibana https://github.com/elastic/kibana/issues/new?

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

Visual Builder (TSVB) does have the Filter Ratio aggregation. While it does create a time series, it also shows a gauge and has markdown output. If you set your Interval as large as your timespan then you effectively get the single value that represents the whole timestpan.

This PR should give you the ability to do what you're looking for: https://github.com/elastic/kibana/pull/13681