Gauge Panel set value and max from query and repeat for labels

Grafana Version: 9.3.2

I’m new to Grafana and Prometheus, so I may be missing something simple, but here’s what I have, and what I would like to make happen:

I have Prometheus instance using Blackbox Exporter to probe approximately 250 remote devices for their current status, what I end up with is a time series with some labels (Region, Customer, Site, ID) and a 0 for failed or a 1 for success.

I have managed to build a Gauge panel that queries by the selected Region, and has a Gauge for each Site label in the region. What I would like is for the Gauge max to be the count of IDs in that site, and the value to be the count of probe successes for the site.

I figured out how to get both numbers with 2 queries:
count by(sitename) (probe_success{regionname="$regions"}==1)
count by(sitename) (probe_success{regionname="$regions"})

But I haven’t been able to figure out a way to set the gauge max to Total. Instead max seems to be pegged to the highest value of any gauge in the query.

As a second feature, I would like the color thresholds to be dynamic as well: Base Red and Green if Success == Total.

Is this possible?

Thank you