I want to create dynamic scripted field (Avg(NA-NB)), which is the average of NA-NB field values based on the date-time range selection.
Currently the average is calculated on the total rows of the NA-NB. What I want is that, if I select the date-time from "2025-01-09 07:30:00" to "2025-01-09 07:30:08", so the average should be calculated on the total of first 9 rows, not all the rows. OR
can we calculate average in Kibana lens or TSVB?