Dashboards & Visualizations

How to color Multivalued field in a dashboard xml?

Cheng2Ready
Communicator

This is what I used
and after applying  the results just highlights the entire mv field in red

<format type="color">
<colorPalette type="expression"> case (match(value,"Large Effect"), "#ff0000",match(value,"Medium Effect"), "#ffff00",match(value,"Small Effect"),"#00ff00",true(),"#ffffff")</colorPalette>
</format>

Cheng2Ready_0-1722976461481.png

looking for

Small effect -> Green
Medium effect -> Orange
and Large effect -> Red

Continuing from this search:
@ITWhisperer 
https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-csv-data-fields-message-data-into-fie...

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Too many brackets - try like this

<colorPalette type="expression">case (match(value,"Large Effect") OR match(value,"No"),"#ff0000",match(value,"Medium Effect"), "#ffff00",match(value,"Small Effect"),"#00ff00",true(),"#ffffff")</colorPalette>

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You will need to mvexpand the field for that you can colour rows of the field

0 Karma

Cheng2Ready
Communicator

That worked!
but im trying to color the words " Large Effect " and "No"  to red
not sure what I did wrong here?

<colorPalette type="expression">case (match(value,"Large Effect") OR (match(value,"No"),"#ff0000",

match(value,"Medium Effect"), "#ffff00",match(value,"Small Effect"),"#00ff00",true(),"#ffffff")</colorPalette>

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Too many brackets - try like this

<colorPalette type="expression">case (match(value,"Large Effect") OR match(value,"No"),"#ff0000",match(value,"Medium Effect"), "#ffff00",match(value,"Small Effect"),"#00ff00",true(),"#ffffff")</colorPalette>
0 Karma
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...