Calculated fields in Kibana

Hello everyone!

I have one question about calculated fields in Kibana.
I have data like:

  • timestamp
  • field1
  • field2

With scripted fields i could divide one value into another ( doc[‘field1’].value / doc[‘field2’].value ). But this division works only for every line (every @timestamp).

Is it possible in scripted fields or somewhere else to calculate every sum for selected @timestamp and divide it (like sum(field1) / sum (field2))?
Result must be only 1 number different on selected @timestamp by user.