How to set Table cell style based on value

Running Grafana v10.2.3 - Ubuntu

In a “Table” - I override the cell type for a field to gauge.
Is there a way to change the style based on value?
(I want actually the cell to be clear if value is 0 (In my case - it should depicts “no such a mountpoint” (/var/lib/kubelet), and not empty directory)
Any kind of solution to differentiate these two states will be welcomed.

Using a transform I divide the metric by itself, you cannot divide by zero, so you get a NaN value for all the zero value metrics, and a 1 for all the other values. Then using another transform, I multiply the result from the first transform by the metric again, this “hydrates” the metrics again to their original values, but the NaN results stay like that, and choose the option to replace all fields, you can also use an organize fields to hide the interim results. then another transform to convert the field to numeric, NaN is not numeric so it returns nothing. Then lastly a field override to change what is displayed when there is no value.

1 Like

Thank you very much!
Much better now. Worked!
I guess there is no way to hide the gauge itself?

you can filter out results that are null or zero as well:


This removes all the row… I have also many other columns:

Optimal solution may be to remove the gauge rendering only for the “master” nodes, that do not have the /var/lib/kubelet mountpoint (writing there “No such a mountpoint” - a bonus)

1 Like