Hiding metric when a variable is selected

Hi all,

So first of all, Grafana is awesome!
What I’m trying to do - Present a sort of drill down on the same graph once a variable is selected.
The reason I want to do it this way is because there is no more room in my dashboard and linking to another dashboard is not very comfortable and is quite cumbersome in this case.

So essentially:
if no variable is selected - show one metric.
If a variable is selected - show another metric.

I thought about maybe doing it in some way through custom variable that is built on a query variable, but not sure how to do it or if it’s possible.

Appreciate any help!

1 Like

Hi,

In general there’s no specific functionality in Grafana for supporting this, however it depends on what datasource you’re using since some of them may allow you to set which metric to use dynamically through a variable, see prometheus templating example dashboard for example.

Marcus

Managed to do so -

1 Like