I am not sure there is a way to retrieve that threshold value (e.g. 12) using Grafana’s templating tools for alerts.
Here is what I do. Instead of “the allowable limits”, I could have written “3.0” (not really the same as what you asked, but thought I would share it anyway):