I have a kibana timelion query to plot the actual performance metrics as follows:
For this I want to add an aggregate line of its average values For which the query is as follows :
The problem is aggregate is performed on the whole time range selected which includes past or future time frames where the data is not present. Thus the average falls drastically below the actual average. How to write the aggregate query to ensure it does not consider the NULL or absence of values in the selected time range and give avg of only the numerically available data points which would be more close to original average.