Errpr :record is missing label windowPeriod

Hi,
We have a query to get the data for the current day and we are getting this error:

 error @15:29-15:30: record is missing label windowPeriod

The query is the following:

from(bucket: “Monitorizacion”)
|> range(start: today())
|> filter(fn: (r) => r[“_measurement”] == “NuevaZIS”)
|> filter(fn: (r) => r[“_field”] == “Abrir barrera BREA”)

What does the error mean? What are we doing wrong?

Thanks in advance.

@ainhoaet Where are you running this query? Is this your entire query?

windowPeriod is a variable that gets set automatically by InfluxDB or Grafana dashboards. There isn’t anything in your query that uses it.

I also just ran into this problem (influxdb-2.7.5). It seems to be specific to the UI Data Explorer. When specifying a range, unless you explicitly use v.timeRangeStart and v.timeRangeStop (populated by the Time Range selector above the script editor), v.windowPeriod will not be defined and the query will fail with that error.