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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...