Coloring background in table with hidden column

Hello All,

Does any one know how this can be done? I have an alarm table with 3 columns called, description, alarm type and value. Alarm type can be alarm or message. I would like to hide this and use coloring (red and orange) to indicate the type.
Kind regards, Eugene

You have not said what version Grafana you are using or what your data source is. But if you are willing to use the old v6 table panel (which is still usable in Grafana v7) then this is relatively easy. I don’t think it’s possible with the default v7 table panel but I could be wrong…

See here for how to convert a v7 table panel to a v6 table panel.

As an example, I use MySQL as a source so “Alarm Type” I would have as a SQL CASE statement where ‘message’ returns the number 50 and ‘alarm’ returns the number 100. Then you can set colour thresholds to 50,100 Color Mode Cell and set your 3 threshold colours to green, orange and red.

Now when the cell is 50 the background will be orange and when 100 the background will be red.

Lastly set Value Mappings of Type Value to text and make 50 map to nothing, and 100 map to nothing. Then the cell is just a colour with no text in it.

Thank you for the reply Codlor. This is how I did it for now. I switched to the old table, and used value mapping to change it to 0 or 1.

I use grafana 7.3.5 with postgres / timescal database.

When doing it like this, it works, but i would like to hide the column on which value mapping is done, and do background coloring on the other columns.

Kind regards, Eugene