Query using "Mean" giving extra tags?

Hi,

I have developed an issue which I’m not able to understand.
At some point (during the night, 13. June) the behavior of my query changes.
My query should return one field, and before the result looks like this:

However, after a specific time (where we typically would never make a change) the exact same query starts looking like this:

These extra tags (error, reference, result) are unknown to me, and they are somehow giving us the error:

unsupported input type for mean aggregate: boolean

if I query more than one value.

If I filter on the _field, these go away, but this should not be necessary as far as I understand. Also, if I change from “Mean” to “Last”, the issue goes away.

Hope someone here can help me understand this (to me) strange behavior. Thanks! :slightly_smiling_face:

I’ve understood now that “error” and “reference” is added because InfluxDB experiences an error when trying to aggregate my data. As if one or more of the datapoints returned from my query is a boolean.

However, there does not seem to be any boolean values. I make a query returning all data from a short time, by setting the window period shorter then how often I write data to Influx. Selecting “Last” should then give me all data. I can not see any boolean values.

Also, by simple selecting the single “_field” in the query builder, the error is gone.

Hello @OdneOksavik,
Can you please share your query?

Off the top of my head the difference in the results could be from the aggregateWindow() function that is automatically applied to your query when you select a range with the UI. This function automatically applies a mean() function to the windows of time that are created by the UI based off on the range you select. The larger the range, the larger the window will be. Your error is also pointing this might be the source because you can’t apply the mean() function to booleans.

To remove the aggregateWindow() function, navigate to the script editor (by the submit button) and comment out the aggregateWindow() function with cmd + / or delete it.

Let me know if this is the source of your errors. If it isn’t can you please make sure to include your query? Thank you!

Ps what are you using Influx for? I’m just curious to learn more about what community members are trying to accomplish.

Hello,

It’s embarrassing to not reply for so long, but I’ve recently encountered this issue again, and I remembered starting this thread.

You are correct that commenting out the aggregateWindow() function removes the error. This is interesting to know. However, it doesn’t solve my issue, since we often will need to use aggregateWindow() to query data.

I also don’t understand why doing mean on the data would throw this error, as there should not be any boolean values. Finally, why does selecting the fields make a difference. I’ve included some screenshots. Thank you very much!

This gives me the error:

Commenting out AggregateWindow removes the error, and returns data from all 4 fields that this query should return:

Specifically including the fields in the query also removes the error: