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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...