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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...