Query with variable does not return data when Multi-Value is enabled

“=” is an exact match in Prometheus.

To do a match on multiple values it would be: “=~” e.g.:

ping_rtt_mean_ms{environment=~"value1|value2|value3"}
or with a variable:
ping_rtt_mean_ms{environment=~"$environment"}

And with variables you may want to select a custom “All” string of .* so it matches on any value. See here for more info: