<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change Column Color - Splunk Dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751465#M242510</link>
    <description>&lt;P&gt;You have to a bit of a trick to do this, because you can't set a colour in one cell with a formula to compare the value of another cell, you can do it this way.&lt;/P&gt;&lt;P&gt;First you turn each of those values into a multi value cell, where the second value is the relationship with the other cell&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;``` Set a colour if they are the same/different ```
| eval colour=if('Valores - Solicitados'='Valores - Recuperados', "#00ff00", 
"#ff0000")
``` Create each field as a multivalue field with the second value as colour ```
| eval 'Valores - Solicitados'=mvappend('Valores - Solicitados', colour)
| eval 'Valores - Recuperados'=mvappend('Valores - Recuperados', colour)
| fields - colour&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you should use CSS to limit the display of those fields to only display the single value, add a hidden html panel with the CSS to hide the multivalue fields 2nd value - note here "coloured_cell" is the id of your table element.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html depends="$hidden$"&amp;gt;
  &amp;lt;style&amp;gt;
    #coloured_cell table tbody td div.multivalue-subcell[data-mv-index="1"]{
       display: none;
     }
  &amp;lt;/style&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should set the id of your table as below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;table id="coloured_cell"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;and then finally use the format specifier in the XML to set the colour&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="Valores - Solicitados"&amp;gt;
  &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;
&amp;lt;format type="color" field="Valores - Recuperados"&amp;gt;
  &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Here's a full example dashboard&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;Demo1&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$hidden$"&amp;gt;
        &amp;lt;style&amp;gt;
          #coloured_cell table tbody td div.multivalue-subcell[data-mv-index="1"]{
            display: none;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="coloured_cell"&amp;gt;
        &amp;lt;title&amp;gt;Colouring a table cell based on it's relative comparison to another cell&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=10
| fields - _time
| eval Result="Result"
| eval "Valores - Solicitados"=random() % 8, "Valores - Recuperados"=random() % 8
``` Set a colour if they are the same/different ```
| eval colour=if('Valores - Solicitados'='Valores - Recuperados', "#00ff00", "#ff0000")
``` Create each field as a multivalue field with the second value as colour ```
| eval "Valores - Solicitados"=mvappend('Valores - Solicitados', colour)
| eval "Valores - Recuperados"=mvappend('Valores - Recuperados', colour)
| fields - colour
| table Result "Valores - Solicitados" "Valores - Recuperados"

          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="Valores - Solicitados"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="Valores - Recuperados"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 13 Aug 2025 02:06:02 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2025-08-13T02:06:02Z</dc:date>
    <item>
      <title>Change Column Color - Splunk Dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751460#M242507</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I need help changing the colors of two columns in my &amp;lt;panel&amp;gt;.&lt;/P&gt;&lt;P&gt;I need to change the colors of the "Values - Requested" and "Values - Retrieved" columns.&lt;/P&gt;&lt;P&gt;When the values in these two columns are the same, color the cell background green. And when they are different, color it red.&lt;/P&gt;&lt;P&gt;Does anyone know how to do this?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isac_santana_0-1755028387598.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/39934i96324F201F07C122/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isac_santana_0-1755028387598.png" alt="isac_santana_0-1755028387598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 19:55:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751460#M242507</guid>
      <dc:creator>isac_santana</dc:creator>
      <dc:date>2025-08-12T19:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change Column Color - Splunk Dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751461#M242508</link>
      <description>&lt;P&gt;&lt;SPAN&gt;IF( "Valores - Solicitados" == "Valores - Recuperados" , Color Verde, Color Red)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 19:58:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751461#M242508</guid>
      <dc:creator>isac_santana</dc:creator>
      <dc:date>2025-08-12T19:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Change Column Color - Splunk Dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751465#M242510</link>
      <description>&lt;P&gt;You have to a bit of a trick to do this, because you can't set a colour in one cell with a formula to compare the value of another cell, you can do it this way.&lt;/P&gt;&lt;P&gt;First you turn each of those values into a multi value cell, where the second value is the relationship with the other cell&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;``` Set a colour if they are the same/different ```
| eval colour=if('Valores - Solicitados'='Valores - Recuperados', "#00ff00", 
"#ff0000")
``` Create each field as a multivalue field with the second value as colour ```
| eval 'Valores - Solicitados'=mvappend('Valores - Solicitados', colour)
| eval 'Valores - Recuperados'=mvappend('Valores - Recuperados', colour)
| fields - colour&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you should use CSS to limit the display of those fields to only display the single value, add a hidden html panel with the CSS to hide the multivalue fields 2nd value - note here "coloured_cell" is the id of your table element.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html depends="$hidden$"&amp;gt;
  &amp;lt;style&amp;gt;
    #coloured_cell table tbody td div.multivalue-subcell[data-mv-index="1"]{
       display: none;
     }
  &amp;lt;/style&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should set the id of your table as below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;table id="coloured_cell"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;and then finally use the format specifier in the XML to set the colour&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="Valores - Solicitados"&amp;gt;
  &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;
&amp;lt;format type="color" field="Valores - Recuperados"&amp;gt;
  &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Here's a full example dashboard&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;Demo1&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$hidden$"&amp;gt;
        &amp;lt;style&amp;gt;
          #coloured_cell table tbody td div.multivalue-subcell[data-mv-index="1"]{
            display: none;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="coloured_cell"&amp;gt;
        &amp;lt;title&amp;gt;Colouring a table cell based on it's relative comparison to another cell&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=10
| fields - _time
| eval Result="Result"
| eval "Valores - Solicitados"=random() % 8, "Valores - Recuperados"=random() % 8
``` Set a colour if they are the same/different ```
| eval colour=if('Valores - Solicitados'='Valores - Recuperados', "#00ff00", "#ff0000")
``` Create each field as a multivalue field with the second value as colour ```
| eval "Valores - Solicitados"=mvappend('Valores - Solicitados', colour)
| eval "Valores - Recuperados"=mvappend('Valores - Recuperados', colour)
| fields - colour
| table Result "Valores - Solicitados" "Valores - Recuperados"

          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="Valores - Solicitados"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="Valores - Recuperados"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;mvindex(value, 1)&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Aug 2025 02:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Column-Color-Splunk-Dashboard/m-p/751465#M242510</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2025-08-13T02:06:02Z</dc:date>
    </item>
  </channel>
</rss>

