Splunk Search

How can I customize color for cell value based on condition?

SanjayReddy
SplunkTrust
SplunkTrust

Hi All,

Currently we have a table like below , Target values are fixed for each row but Columns will added dynamically(it can be any month of calendar year) ex: June July August etc.. , these are actually coming from month field, after stats we used chart command to show month names as columns.

target    June    July   

100         100      96

98             96      100 

97             92       93

96             90       91 

now based on following conditions  where each cell value is need to compare  with corresponding target value 

ex: 100 in June need to compare with  100 in target and 96 in June need to compare with 98 in target so on... 

         If June>= target -> show the june in green

  • If june -  target < 5% -> show the june in blue
  • If june - target > 5% -> show the june in red

expected output 

SanjayReddy_0-1666882729685.png

 

Labels (1)
0 Karma

johnhuang
Motivator

If you need to colorize each cell based on calculated conditions with data from another cell, you will have to write a custom JS + CSS to do that.

Here's an example of how it could be done:

https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-JavaScript-question-How-can-I-compa...

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...