<?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: How to color the column based on the value of another row in splunk dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756607#M59318</link>
    <description>&lt;P&gt;What do you actually want to change colour of? A column? I suppose it is a row but you keep repeating "column" as if it was no mistake.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2025 05:24:07 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-12-18T05:24:07Z</dc:date>
    <item>
      <title>How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756606#M59317</link>
      <description>&lt;P&gt;Hey Splunk team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data similar to this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval data="ABC,10,15;DEF,12,13;GHI,11,14"
| makemv delim=";" data
| mvexpand data
| eval label=mvindex(split(data,","),0)
| eval duration1=tonumber(mvindex(split(data,","),1))
| eval duration2=tonumber(mvindex(split(data,","),2))
| eval duration_diff=abs(duration1 - duration2)
| table label duration1 duration2 duration_diff&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which I wanted to highlight the color in red,&amp;nbsp; if value of abs(duration1 - duration2) is &amp;gt;2, making the column red. In the example above,&amp;nbsp;column 10, 15 &amp;amp; 11, 14 should be red.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do something like this but not able to get it work, could you help me how to do that, thank you!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="duration2"&amp;gt;
    &amp;lt;colorPalette type="expression"&amp;gt;if ($row.duration_diff$ &amp;amp;gt; 2 ,"#DC4E41", null())&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 02:41:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756606#M59317</guid>
      <dc:creator>darrfang</dc:creator>
      <dc:date>2025-12-18T02:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756607#M59318</link>
      <description>&lt;P&gt;What do you actually want to change colour of? A column? I suppose it is a row but you keep repeating "column" as if it was no mistake.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 05:24:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756607#M59318</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-12-18T05:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756615#M59319</link>
      <description>&lt;P&gt;The row tokens don't work in palette expressions. You could try something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, the technique is to create a multi-value field with a tag for the colour you want to be used, then use format/colorPalette to set the colour and some CSS to hide the extra value in the multi-value field&lt;/P&gt;&lt;P&gt;See this solution&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-change-table-cell-background-color-depends-on-search/m-p/571767/highlight/true?search-action-id=78404511336&amp;amp;search-result-uid=571767#M199243" target="_self"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-change-table-cell-background-color-depends-on-s...&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 09:57:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756615#M59319</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-12-18T09:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756642#M59320</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/269861"&gt;@darrfang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can use CSS to manipulate cell foreground and background colors. This example uses the duration_diff field's style as a key, changes the duration1 and duration2 cell colors, and then hides the duration_diff field's associated th and td elements:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1" theme="light"&amp;gt;
  &amp;lt;label&amp;gt;range_table&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html id="my_html"&amp;gt;
        &amp;lt;style&amp;gt;
          #my_table td:not([data-cell-index="0"]):has(~ .color-formatted[style="color: rgb(255, 255, 255); background-color: rgb(212, 31, 31);"]) {
            color: rgb(255, 255, 255);
            background-color: rgb(212, 31, 31);
          }

          #my_table td.color-formatted {
            display: none !important;
          }
          
          #my_table th[data-sort-key="duration_diff"] {
            display: none !important;
          }
          
          #my_html {
            display: none !important;
          }
        &amp;lt;/style&amp;gt;   
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="my_table"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| eval data="ABC,10,15;DEF,12,13;GHI,11,14"
| makemv delim=";" data
| mvexpand data
| eval label=mvindex(split(data,","),0)
| eval duration1=tonumber(mvindex(split(data,","),1))
| eval duration2=tonumber(mvindex(split(data,","),2))
| eval duration_diff=abs(duration1 - duration2)
| table _time duration1 duration2 duration_diff&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;0&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;format type="color" field="duration_diff"&amp;gt;
          &amp;lt;colorPalette type="list"&amp;gt;[#FFFFFF,#D41F1F]&amp;lt;/colorPalette&amp;gt;
          &amp;lt;scale type="threshold"&amp;gt;2&amp;lt;/scale&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tscroggins_0-1766115586766.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/41048iAD04DFD60BE984DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tscroggins_0-1766115586766.png" alt="tscroggins_0-1766115586766.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 03:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756642#M59320</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2025-12-19T03:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756758#M59321</link>
      <description>&lt;P&gt;thanks! this is the trick that works for my case!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 23:33:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756758#M59321</guid>
      <dc:creator>darrfang</dc:creator>
      <dc:date>2025-12-23T23:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to color the column based on the value of another row in splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756759#M59322</link>
      <description>&lt;P&gt;Thank you so much! this also works on my cases,&amp;nbsp; sorry the system only allows me to accept one solution for now but this solution works perfectly on what I would like to achieve&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 23:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-the-column-based-on-the-value-of-another-row-in/m-p/756759#M59322</guid>
      <dc:creator>darrfang</dc:creator>
      <dc:date>2025-12-23T23:36:10Z</dc:date>
    </item>
  </channel>
</rss>

