Dashboards & Visualizations

Format Column Color Based on Evaluation on Other Column

aohls
Contributor

I have the following columns:
Action |OneMonthAverage|TwoMonthAverage
Click | 10 | 15
Double-Click| 30 | 20

What I want is for the formatting color to get set on OneMonthAverage if it is greater than the TwoMonthAverage. Is this possible?

Tags (2)
0 Karma

niketn
Legend

@aohls refer to answer by @kamlesh_vaghela where
Step 1) You need to bring the two columns together using SPL

  | eval OneMonthAverage = OneMonthAverage."|".TwoMonthAverage

Step 2) Use SimpleXML JS Extenstion with SplunkJS to access Table Cell using JavaScript. Parse OneMonthAverage cell value and Split by | character.
Step 3) Apply Color based on comparison of One Month and Two Month average.
Step 4) Save the value of One Month Average as Cell Value.

https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html#answer-661...

Please try out and confirm.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...