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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...