Logical operators and conditional values in alerts' annotations

I’m trying to pass an annotation to a template based on the evaluation of a math expression.
Is this possible and the right way of doing it ?

{{ if gt (float64 ($values.C)) 20 }}
“true”
{{ else }}
“false”
{{ end }}

This should work:

{{ if gt $values.C.Value 20.0 }} true {{ else }} false {{ end }}