Dashboards & Visualizations

How can i acheive the coloring based on two column values?

ramarcsight
Explorer

hello everyone i have a table like this

| makeresults
| eval time_diff=4
|eval datapoint=3
| table time_diff datapoint

time_diff datapoint
4 3

what i want is i want this table on a dashboard in such a way that when the both values r equal the row should be colored green , when they are not equal red
is that possible?
Please post the XML if you can , thank you very much

Tags (1)
0 Karma
1 Solution

niketn
Legend

@ramarcsight, refer to this answer by @kamlesh_vaghela https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html#answer-661...

You can combine two columns together in the table.
Then use Splunk JS to parse the combined cell value to decide the color the applied.
Finally, within Splunk JS split the combined column into two separate columns as per the requirement.

Please try out and let us know if it does not work. If it does work, do not forget to up vote the answer by Kamlesh in the provided link.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@ramarcsight, refer to this answer by @kamlesh_vaghela https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html#answer-661...

You can combine two columns together in the table.
Then use Splunk JS to parse the combined cell value to decide the color the applied.
Finally, within Splunk JS split the combined column into two separate columns as per the requirement.

Please try out and let us know if it does not work. If it does work, do not forget to up vote the answer by Kamlesh in the provided link.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

ramarcsight
Explorer

Definitely i wil try and let you know , Thank you very much !!

0 Karma

niketn
Legend

@ramarcsight , seems like your issue is resolved. Do up vote the original answer by @kamlesh_vaghela.

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

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...