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
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...