Based on variables respective queries should execute

Hello All,

I had a custom variable and am using the same variable as a filter. Based on the selection of the filter the Prometheus query should execute. like if I select one value from a filter some query should not run, and similarly, if I select another value from the filter the same query should execute.

Can we do this?

Thanks & regards,
Bharath Kumar.

Why present those values in the choice of items in the first place?

My data source is Prometheus. Can I change the execution of queries based on the filters? I want to do this because I am using multiple data sources, so based on the filter values the query should run.