<?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 How to add multiple conditions and the respective color coding for all the fields? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656075#M54042</link>
    <description>&lt;P&gt;I have my table panel with the column field as Month-year and this is a dynamic fields populated from my panel query. One more column is a text field and it is a static field. (This does not need to be color coded.)&lt;/P&gt;&lt;P&gt;I want to color code the cell values in all the dynamic field, based on the below condition&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if the cell value is less than 2 - the cell should be coded in green&lt;/LI&gt;&lt;LI&gt;if the cell value is more than 2 - the cell should be coded in red.&lt;/LI&gt;&lt;LI&gt;Other cells with text values - the cell should not be color coded.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I tried to use multiple conditions with color palatte expression but that does not work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;if(isnull(value), "#c1fa9b", if(value&amp;amp;lt;02, "#c1fa9b", "#ff9c9c"), if(value&amp;amp;gt;02, "#ff9c9c", "#c1fa9b"))&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the two conditions similar, just to filter the fields with text values. So that all the numeric fields with values less than 2 will be displayed as green and the greater than 2 will be displayed as red.&lt;/P&gt;&lt;P&gt;I am aware of writing JS scripts for this but would like to make this with SimpleXML.&lt;/P&gt;&lt;P&gt;Could anyone please help me on this?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2023 09:34:52 GMT</pubDate>
    <dc:creator>akarivaratharaj</dc:creator>
    <dc:date>2023-08-30T09:34:52Z</dc:date>
    <item>
      <title>How to add multiple conditions and the respective color coding for all the fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656075#M54042</link>
      <description>&lt;P&gt;I have my table panel with the column field as Month-year and this is a dynamic fields populated from my panel query. One more column is a text field and it is a static field. (This does not need to be color coded.)&lt;/P&gt;&lt;P&gt;I want to color code the cell values in all the dynamic field, based on the below condition&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if the cell value is less than 2 - the cell should be coded in green&lt;/LI&gt;&lt;LI&gt;if the cell value is more than 2 - the cell should be coded in red.&lt;/LI&gt;&lt;LI&gt;Other cells with text values - the cell should not be color coded.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I tried to use multiple conditions with color palatte expression but that does not work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;if(isnull(value), "#c1fa9b", if(value&amp;amp;lt;02, "#c1fa9b", "#ff9c9c"), if(value&amp;amp;gt;02, "#ff9c9c", "#c1fa9b"))&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the two conditions similar, just to filter the fields with text values. So that all the numeric fields with values less than 2 will be displayed as green and the greater than 2 will be displayed as red.&lt;/P&gt;&lt;P&gt;I am aware of writing JS scripts for this but would like to make this with SimpleXML.&lt;/P&gt;&lt;P&gt;Could anyone please help me on this?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 09:34:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656075#M54042</guid>
      <dc:creator>akarivaratharaj</dc:creator>
      <dc:date>2023-08-30T09:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add multiple conditions and the respective color coding for all the fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656079#M54043</link>
      <description>&lt;P&gt;By the way, you conditions do not take account of the value being 2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;format type="color"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;case(isnull(value),"#c1fa9b", value &amp;amp;lt; 02, "#c1fa9b", value &amp;amp;gt; 02, "#ff9c9c")&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Aug 2023 10:02:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656079#M54043</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-30T10:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add multiple conditions and the respective color coding for all the fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656083#M54044</link>
      <description>&lt;P&gt;Thankyou!&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code with&lt;STRONG&gt; case&lt;/STRONG&gt; statement is working for me. To consider the value '2' also, I can use&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;value &amp;amp;lt;= 02&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 10:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-multiple-conditions-and-the-respective-color-coding/m-p/656083#M54044</guid>
      <dc:creator>akarivaratharaj</dc:creator>
      <dc:date>2023-08-30T10:20:21Z</dc:date>
    </item>
  </channel>
</rss>

