How to set max value of gauge panel by using query

Hi, how can I make this gauge display properly? I have just 13 devices, but the gauge is showing 100.

Thanks

Gauges has Min - Max range:

So just set Min, Max configs for your case.

of course. but the number of devices can change every day, I need it to set to COUNT of the devices

This is example for Stat I have with count of devices and it works

SELECT COUNT(DISTINCT("device_id")) FROM (
  SELECT LAST("status") AS "status" FROM "heartbeat" GROUP BY "device_id"
)

Add it as third query and then add Config from query results transformation, where you use result from this query to set Max config of the panel. Example:

2 Likes


it helped with the ‘inner green’ but the main thin one is still 1-100

Provide reproducible example first,pls.