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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...