Dashboards & Visualizations

Change the color of cell based on the condition in other cell

khojas02
Engager

Hi All,

I have a table something like this

MetricID                             Count                     Percent

AA                                        1404                       4%

BB                                         256                         13%

CC                                         749                        31%

Now, for each MetricID, I have some condition and based on that condition I would like the background color of Count and Percent columns to be changed to Green, Yellow and Red. Is it possible to do with Splunk?

Essentially I don't want to change the color of entire Count of Percent column, rather based on the condition for each MetricID, I would like to change the color for respective Count and Percent values.

Thanks in advance!!

Labels (1)
0 Karma

niketn
Legend

@khojas02 yes this would be possible with Splunk. Could you elaborate on the conditions that are possible with Metrics ID?

Please refer to following couple of answers which document three options to do it depending on whether you want to use JS or not.

https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-highlight-a-table-cell-based-on...

https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-font-color-based-on-a-condit...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

anilchaithu
Builder

@khojas02 

you have to use simple js& css code to change the color of the row. Splunk dashboard examples has the sample code (table row highlighting). you can use that

https://splunkbase.splunk.com/app/1603/

 

hope this helps.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...