Templating DataSource not working

I cannot template a datasource. I can add the template-variable and it shows up on top and populates correctly.

However, I cannot find the template variable in the Data Source drop-down above the queries. And trying to manually write $prometheus_ds is ignored, it magically jumps “–Mixed–” instead and uses “default” for the per-query datasource, which does not change when I change template datasource value.

Am I doing anything wrong, or is this a bug in the Data Source drop-down-select function?

Grafana v4.6.2 with Prometheus datasources.

Ok, so here is proof that I’m not demented :slight_smile:

BUT, when creating a fresh dashboard, then creating the template variables, and then creating a new panel it all works!

Strange - I can’t recreate this. It works on an existing dashboard for me. Is it still like this if you save the dashboard and refresh the page?