Dear Influx Experts,
I’ve created an API to fetch data from Influx to Excel. My API was successful and it gives me the data according to what is in the influx.
I have some issues (I don’t know if this is issue on influx or on my query side). So I tried to query "Select mean(value) from measurementName Where time >= StartTime and time <= EndTime Group by time(1m).
To be specific the range of time is to be 5 mins, so it’s like I am querying a time between, 12:05 PM to 12:10 PM, something like that.
So this is what the results look like: (please see image below, “Aggregated mean(5-10min with 1m interval”)
It seem’s right at this moment, and I have trust that Influx automatically calculate mean values every min. By the way, my values are changing every seconds.
So here’s the thing, so let say I’ve queried 12:05 PM to 12:10 PM with interval “1m” and get the mean, does the 12:05 PM result is the average values between 12:04 PM to 12:05 pm?
and 12:06 results is the average of 12:05 PM to 12:06 pm?
That is actually my understanding when querying aggregated functions (please correct me with this).
If my understanding is right, so I did some testing, I tried to query raw values between 12:04 PM to 12:05 PM and get all the raw values in there. So here is the result: (see image below: Raw values(4-5min) and Raw values (5-6min))
As you can see on the top, using the Excel function “=Average”, I get the results between 12:04 PM to 12:05 PM different values from InfluxDB. I also tried to query raw values of 12:05 PM to 12:06 PM and get the average values too, but it also has different values from influx mean queries.
Is my understanding on how influx compute the mean is right? because when I did the testing, the values are different, I hope I am wrong with this.
Hoping for your kind responds.
PS: Sorry I can only upload 1 image.
Thank you and stay safe.