Limit ad-hoc filter option values

In the datasource of type Prometheus, there are several services of my team present, so when I connect my Grafana board to it, one ad-hoc filter of label “env” has too many options to choose from, coming from each of every services on that datasource.

For panels I can manage to overcome this, coz I have filter of productName which can limit metrics to those of my service, but for env, I don’t know what values come from my services, and what are from other services.

Is there any way to limit the values in that filter, so that I can see only those of mine? Like, adding a filter for options of this filter.

All values like this:


from which I know common-jpa, dev and common-jpa, preprod belong to my service; but for production I don’t know.

For now I found a workaround:

use another variables of type query and with label_values({productName="$productName"}, env) to list all possible values. It will get me common-jpa,dev and common-jpa,preprod. Then I find these values in env filter. Not perfect but is the best I can do now.