<?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 a cell on dashboard based on condition when column names are dynamic? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704098#M57687</link>
    <description>&lt;P&gt;Veryy helpful! Thx!&lt;/P&gt;&lt;P&gt;My case is with three conditions , can you help me color different cases as such please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;LogLevel : INFO -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;Blue&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;LogLevel : WARRNING -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FFCC00"&gt;Yellow&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;LogLevel : Error -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;Red&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I come up with is below but not working&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
&amp;lt;colorPalette type="expression"&amp;gt;

if(match(value,"logLevel=INFO"),"#4f34eb",null),

if(match(value,"logLevel=WARNING"),"#ffff00",null),

if(match(value,"logLevel=ERROR"),"#53A051",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>Mon, 11 Nov 2024 15:08:20 GMT</pubDate>
    <dc:creator>a1bg503461</dc:creator>
    <dc:date>2024-11-11T15:08:20Z</dc:date>
    <item>
      <title>How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/526961#M35772</link>
      <description>&lt;P&gt;I have a table within a dashboard that is displaying information comparing event counts from a customer site to the event counts back here at corporate.&amp;nbsp; The goal is to easily identify if corporate is missing any event data from the customer site.&amp;nbsp; Here is a screenshot of the table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhavlik_0-1603913876542.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11558i1F5CCF9924D3DFF0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhavlik_0-1603913876542.png" alt="bhavlik_0-1603913876542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to highlight any cells where "Missing=Yes" so it visually pops out to anyone viewing the dashboard.&amp;nbsp; I found this post &lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-change-the-cell-color-based-on-partial-value/m-p/447409" target="_self"&gt;How-do-you-change-the-cell-color-based-on-partial-value&lt;/A&gt;&amp;nbsp;but that solution is for columns whose name remain the same.&amp;nbsp; In my table, the column names will change each day as the column names are the dates being displayed.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a way to color a cell based on a condition when the column names are dynamic?&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I also want to offer up that I am a beginner in Splunk and have no experience with using JavaScript or anything else besides Simple XML.&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/526961#M35772</guid>
      <dc:creator>bhavlik</dc:creator>
      <dc:date>2020-10-28T19:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/526970#M35774</link>
      <description>&lt;P&gt;If you don't specify a field name, it applies to the whole table, so try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;format type="color"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;if(match(value,"Missing=Yes"),"#53A051",null)&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Oct 2020 23:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/526970#M35774</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-28T23:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/527113#M35781</link>
      <description>&lt;P&gt;Wow!&amp;nbsp; That was so much easier than I thought! Thanks kind stranger.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 15:12:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/527113#M35781</guid>
      <dc:creator>bhavlik</dc:creator>
      <dc:date>2020-10-29T15:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704098#M57687</link>
      <description>&lt;P&gt;Veryy helpful! Thx!&lt;/P&gt;&lt;P&gt;My case is with three conditions , can you help me color different cases as such please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;LogLevel : INFO -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;Blue&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;LogLevel : WARRNING -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FFCC00"&gt;Yellow&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;LogLevel : Error -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;Red&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I come up with is below but not working&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
&amp;lt;colorPalette type="expression"&amp;gt;

if(match(value,"logLevel=INFO"),"#4f34eb",null),

if(match(value,"logLevel=WARNING"),"#ffff00",null),

if(match(value,"logLevel=ERROR"),"#53A051",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>Mon, 11 Nov 2024 15:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704098#M57687</guid>
      <dc:creator>a1bg503461</dc:creator>
      <dc:date>2024-11-11T15:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704101#M57688</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
&amp;lt;colorPalette type="expression"&amp;gt;

case(match(value,"logLevel=INFO"),"#4f34eb",match(value,"logLevel=WARNING"),"#ffff00",match(value,"logLevel=ERROR"),"#53A051")

&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Nov 2024 15:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704101#M57688</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-11-11T15:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704102#M57689</link>
      <description>&lt;P&gt;Sadly its still not working all is colored red as the last defined one:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;       &amp;lt;format type="color"&amp;gt;
&amp;lt;colorPalette type="expression"&amp;gt;

case(match(value,"logLevel=INFO"),"#4f34eb",match(value,"logLevel=WARNING"),"#ffff00",match(value,"logLevel=ERROR"),"#53A051")

&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 15:46:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704102#M57689</guid>
      <dc:creator>a1bg503461</dc:creator>
      <dc:date>2024-11-11T15:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a cell on dashboard based on condition when column names are dynamic?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704434#M57728</link>
      <description>&lt;P&gt;Not sure if this will help but here's a couple things I noticed.&amp;nbsp; In your original question, you have the word "Log" capitalized but in the syntax it is not.&amp;nbsp; Could that be why it's not working?&amp;nbsp; I also noticed that in your question the words "INFO" and "WARNING" are all capitalized but "Error" is not but you have it as "ERROR" in the syntax.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I often have spelling mistakes in my code that I don't catch right away so thought I'd offer that up as a suggestion.&amp;nbsp; Good luck!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 17:30:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-color-a-cell-on-dashboard-based-on-condition-when-column/m-p/704434#M57728</guid>
      <dc:creator>bhavlik</dc:creator>
      <dc:date>2024-11-14T17:30:59Z</dc:date>
    </item>
  </channel>
</rss>

