Dashboards & Visualizations

How to color one cell in a table BASED on the value of other cell in xml?

simon21
Path Finder

I have two fileds: Value and Status
Value contains the actual numeric value and Status contains the state (Green,Amber,Red) in textual format.

I need to change the color of value field based on the text of the Status field.
So if value is 2 and Status is Green, the Value should be colored Green.

I cannot use direct color option using the edit(art brush) since the Status field evaluates the state.

Please help.

Thanks

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @simon21,

Did either of the below answers get to the bottom of your question? If so, please resolve this post by approving one of the answers below. If not, keep us updated so that someone else can help solve your problem.

Also, if you're feeling generous, give out an upvote to the user that helped ya. Our users love them upvotes. 🙂

0 Karma

niketn
Legend

@simon21 check out the answer by @kamlesh_vaghela where you can combine the Value and Status in Single Cell Value using SPL (Status field remains separate and untouched). Then use Simple XML JS Extension to apply the cell color based on Value after which you can split and retain only number and discard Status using JavaScript.

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

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...