Using printf "%.2f" for decimals returns a weird string using "reduce expression"

Hi, following this thread and solution: How to round to 'two decimals' the value in the new 9.3.1 alert system? - #5 by georgerobinson this works great if you use the “classic condition expression”, but not if I use the reduce expression.

I’m using this as AlertValues

{{ with $values }}{{ if $values.C }}Latency: {{printf "%.1f" $values.B }}ms 
{{ end }} {{ end }}

But it returns this string:

In this alert (0.00001 threshold is just for test)

Instead, if I switch to classic condition and I use

{{ with $values }}{{ range $k, $v := . }}CPU: {{ printf "%.1f" $v.Value }}% 
{{ end }} {{ end }}

Works perfect, but I want to use the reduce expression, becuse with it, I can also get the alert with the value when it comes back inside the threshold.

If someone has a link to a documentation with the query in the alert, it would be great, I prefer to learn instead of ask. But I can’t find a good guide.

Thanks a lot!

Oh, I solved it alone, I used:

{{ with $values }}{{ if $values.C }}Latency: {{ $values.B.Value | printf "%.1f" }}ms
{{ end }} {{ end }}

So, just add the $values.B.Value and the printf "%.1f"