How to execute different queries depending on Custom variable value

  • What Grafana version and what operating system are you using?
    Grafana v11.1.4 on ubuntu-20.04

  • What are you trying to achieve?
    Want to execute a query when a specific Variable value is selected in the dashboard

  • How are you trying to achieve it?
    Created a custom variable called “Value”. Created two queries A and B. Trying to Execute query A when “Value” is selected as 10. and execute query B when “Value” is selected as 20.

  • What happened?
    Not able to perform the query depending on the selected value from variable.

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Did not get any error

  • Did you follow any online instructions? If so, what is the URL?