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!

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

Observability Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestSplunk APM's New Tag Filter ExperienceSplunk APM has updated ...