OSS v2 is it possible to use variables to set the range for the Gauge?

What i would like is a Gauge that’s range changes depending of the data shown. ie if the data is filtered to a host that has 2 cpus then I would like the load on the gauge to show between 0 and 2 but if the Dash variable is changed to show the dash for a host with 6 cpus then I would like the Gauge to change to show the load from 0 thought to 6?

would be nice if “cpus” could be used in the Gauge Thresholds?

cpus = from(bucket: v.host)
  |> range(start: v.timeRangeStart)
  |> filter(fn: (r) => r._measurement == "system")
  |> filter(fn: (r) => r._field == "n_cpus")
  |> last()
  |> yield(name: "last")