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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...