Logs filled with error message from "missing from point"

I have the following tickscript:

SELECT mean(“used_percent”) FROM “telegraf”.“default”.“swap” WHERE time > now() - 15m AND host =~ //
.id(’{{ index .Tags “host” }}’)
{{ .Level }}*: {{ .ID }}
Swap: {{ index .Fields “mean” | printf “%0.2f” }} ‘)

Host Name:{{ index .Tags “host” }}

Severity: {{ .Level }}

Swap: {{ index .Fields “mean” | printf “%0.2f” }}

Time : {{ index .Time }}

// Compare values to running mean
.crit(lambda: “mean” > 90)
.username(‘Telegraf Non Prod Alert’)

which fills the logs with thousands of these messages:
ts=2020-01-31T18:34:48.600Z lvl=error msg=“failed to realize reduce context from fields” service=kapacitor task_master=main task=telegrafswap_alerts node=max2 err=“field “mean_used_percent” missing from point”

How can I make it so these alerts work properly, without flooding my logs. I tried FILL(null) which didn’t seem to help