I have a timeseries (minute granularity) with a string field F1and numeric field F2 indexed ES.
I would like to first do sum(F2) over the string field and then calculate time average. Example below :
For example :
Time, F1, F2
10:05, A, 2,
I want to aggregate SUM(F2) group by A, B both
At the same time unique count(Time)
then SUM(F2)/unique count(Time) for A as well as B
My expected result should be
Time , F1, F2
10th hour, A, =SUM(2+3+3)/count unique(:05+:10,:15) => 8/3
10th hour, B, =SUM(5+2)/count unique(:10, :15) => 7/2
Is it doable in kibana?