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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...