Repeat by row and within row

I have two variables, let’s call them var1 and var2, where the query for var2 depends on the value of var1.
So far so good …
I want to have rows repeating by var1, specifying ALL, so that I get a row for each value of var1, and then within each row I want to repeat by all values of var2, by specifying ALL for var2 (and this set of values should depend on the value of var1 for the row).
However, when I try this, I get a row for each value of var1, but within each row I just get a single set of panels, with var2 taking the value “ALL”.
I’m guessing this is because the value “ALL” is being substituted as the value of var1 into the query for var2, instead of the value of var1 for the current row.
Is it possible to do what I’m trying to do here?
(I’m using Grafana v6.0.0 (34a9a62) and Prometheus data source)

I’ve had the same issue and tried various ways to edit the queries creating “var1” and “var2” to get this to display correctly. The best so far is repeating all values of var2 in each row but only the ones that pertain to var2 are populated with data. Not great.

Though the question is old, let see how many person this answer will help!

I achieve a similar thing by using the first variable in the query of the second.

Fist: variables service : Type Label values. Label: service. Metric : probe_success

Second variable : name: target; Type : Label values; Label : instance; Metric: probe_success{service=~“$service”}.

The insight here is that the Metric field takes a full PromQL query. Thus service label is used to filter showed instances.

That is it.