Problem with Singlestat and negative numbers

I seem to have an interesting problem with Singlestat. I’m selecting current values that range from -5000 to 5000 and the values get loaded and truncated to integers correctly. For positive numbers with decimal fractions, the guage shows correctly, but whenever the number goes negative and has decimal places the guage vanishes. The value is still correctly displayed, just no guage. The sql being used is as follows


UNIX_TIMESTAMP(time_ts) as time_sec,
-floor(solar.PowerReal_P_Sum) as value,
“Power Usage” as metric
FROM solar
WHERE $__timeFilter(time_ts)
ORDER BY time_ts ASC

This is the fixed version that works for me. The differrence between this and the one that fails is that this one has the “floor” function to round the number. Without it on negative numbers the guage vanishes.

An example of some of the number I have been using are





Please see


Hi Marcus,
Thanks for that info. The guage does work. It just needs the floor() function to fix it.


I saw that you commented on the feature request issue. For now I don’t think there are anything more I can help you with?