I got a situation where I want to calculate the moving average.
All the existing moving average functionality looks like this :
MOVING_AVERAGE(MEAN(“field”), N ) … GROUP BY time(interval)
Where N is the number of points before the current calculated number to include in the calculation of the moving average.
But what I want to calculate is the moving average on a certain time of the day during the week.
So for example: MOVING_AVERAGE(MEAN(“field”) , N , P ) … GROUP BY time(interval)
Where N is the same as above
But P is the period between those points.
For example P = 1w , to calculate the moving average based on averages on the same timebucket N weeks before. ( For example timebucket : Monday 10:00-10:30)
Does somebody knows how to fix this with querying Influx?
To filter for that schedule. I also included the seconds in the mapping but you don’t need that to just reduce the values to monday from 10:00-10:30
All those function return values with ranges starting at 0.