Templating labels and and annotations not working

The version of Grafana that I’m working on is v9.2.1

I am trying to get a label/annotation configured depending on value of a query.

Following this documentation: Template labels and annotations | Grafana Cloud documentation

when the the alert is fired it shows up as

“{{ if (gt $values.A.Value 0.3) -}} high {{ else if (gt $values.A.Value 0.2) -}} medium {{ else -}} low {{- end }}”

It looks like the conditions are not being evaluated.

Could someone help me identify the cause? Is it a syntax mistake on my end ?

Hi! :wave: Can we see your query? Is it an instant query? If not, it needs to be an instant query.