<?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: color bar based on condition in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644105#M52598</link>
    <description>&lt;P&gt;the y-axis is the count if the IDs while the RED,GREEN,YELLOW are the criticality of the difference between the two dates and for the gray one it's based on another column where the value of the column is yes or no when it's no it should be gray otherwise it should check the another condition to choose RED,YELLOW or GREEN&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2023 09:33:27 GMT</pubDate>
    <dc:creator>hagar71</dc:creator>
    <dc:date>2023-05-22T09:33:27Z</dc:date>
    <item>
      <title>How to achieve color bar based on condition?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644070#M52589</link>
      <description>&lt;P&gt;Hello Splunkers&lt;/P&gt;
&lt;P&gt;I want to customize the color of the bars based on condition like the example where ID,&amp;nbsp;DateChanged,PlannedDate_1 and&amp;nbsp;PlannedDate_2 are columns and the Date format is dd.mm.yyyy HH:mm and there is a dublication in the ID so I wanted to take the latest Dates&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Green --&amp;gt; All the ID with the DateChanged = no&lt;/P&gt;
&lt;P&gt;Red --&amp;gt; All the ID with the DateChanged = yes AND PlannedDate_1 and PlannedDate_2 have a gap of less than 14 days&lt;/P&gt;
&lt;P&gt;yellow --&amp;gt; All the ID with the DateChanged = yes AND PlannedDate_1 and PlannedDate_2 have a gap between 14-20 days&lt;/P&gt;
&lt;P&gt;Green --&amp;gt; All the ID with the DateChanged = yes AND PlannedDate_1 and PlannedDate_2 have a gap of more than 20 days&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 12:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644070#M52589</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T12:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644073#M52590</link>
      <description>&lt;P&gt;Colouring in charts is at the series level, not individual bars.&lt;/P&gt;&lt;P&gt;Have you separated your conditions into separate series?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 07:51:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644073#M52590</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T07:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644076#M52591</link>
      <description>&lt;P&gt;No I didn't, how could I do that?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 07:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644076#M52591</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T07:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644078#M52592</link>
      <description>&lt;P&gt;It depends on your events and what you are trying to achieve. To be honest, it may not be possible to achieve what you are hoping for.&lt;/P&gt;&lt;P&gt;What events do you have to work with, and what is your current search?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 08:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644078#M52592</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T08:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644080#M52593</link>
      <description>&lt;P&gt;I am working with csv file and I stopped in index=test becuse I don't know how could I create if condition in Splunk&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 08:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644080#M52593</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T08:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644084#M52595</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If you want more help, you will have to be more specific as to what exactly you have tried. I lost my mind-reading license after a misunderstanding with an African Prince!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 08:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644084#M52595</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T08:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644095#M52596</link>
      <description>&lt;P&gt;this is my query till now based in the if condition that I want but I want to visualize them based on their colors in the query&amp;nbsp;&lt;BR /&gt;index=test | eval start=strptime(PlannedDate_1,"%d.%m.%Y %H:%M") | eval end=strptime(PlannedDate_2,"%d.%m.%Y %H:%M") | eval difference = start - end&lt;BR /&gt;| eval red = if(difference&amp;lt;14 AND DateChanged="yes" ,total_time,0)&lt;BR /&gt;| eval yellow = if(difference&amp;lt;20 AND difference&amp;gt;14 AND DateChanged="yes",difference,0)&lt;BR /&gt;| eval green = if(difference&amp;gt;20 AND DateChanged="yes", difference, 0)&lt;BR /&gt;|eval gray=if(DateChanged="no", difference, 0)&lt;BR /&gt;| table red, yellow, green&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644095#M52596</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T09:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644099#M52597</link>
      <description>&lt;P&gt;red has total_time, whereas yellow, green and gray have difference. Is this correct?&lt;/P&gt;&lt;P&gt;Given that you appear to be wanting to use a bar(?) chart, what do you want the y-axis to represent? the count of each colour, or the sum of the amounts for each colour?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644099#M52597</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T09:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644105#M52598</link>
      <description>&lt;P&gt;the y-axis is the count if the IDs while the RED,GREEN,YELLOW are the criticality of the difference between the two dates and for the gray one it's based on another column where the value of the column is yes or no when it's no it should be gray otherwise it should check the another condition to choose RED,YELLOW or GREEN&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644105#M52598</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T09:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644107#M52599</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=test | eval start=strptime(PlannedDate_1,"%d.%m.%Y %H:%M") | eval end=strptime(PlannedDate_2,"%d.%m.%Y %H:%M") | eval difference = start - end
| eval colour=case(difference&amp;lt;14 AND DateChanged="yes" ,"red",difference&amp;lt;20 AND difference&amp;gt;14 AND DateChanged="yes","yellow",difference&amp;gt;20 AND DateChanged="yes", "green",DateChanged="no","gray")
| where colour == "red" OR colour == "yelow" OR colour == "green"
| chart count by colour&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 May 2023 09:39:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644107#M52599</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T09:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644108#M52600</link>
      <description>&lt;P&gt;and how could I visualize it?&lt;BR /&gt;&amp;lt;option name="charting.fieldColors"&amp;gt;{"red":"#DC4E41","yellow":"#F8BE34","green":"#5CC05C","gray":"#A9A9A9"}&amp;lt;/option&amp;gt; isn't working here&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644108#M52600</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T09:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644110#M52601</link>
      <description>&lt;P&gt;Sorry, I missed a line - try adding this to the end of the search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| transpose 0 header_field=colour&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 May 2023 10:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644110#M52601</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T10:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644111#M52602</link>
      <description>&lt;P&gt;last 2 questions please&lt;BR /&gt;if I want to take the values only for the newest IDs as the IDs are duplicated but with different dates how could I do this?&lt;BR /&gt;and if I want to click on the chart to show the IDs for the red, yellow and green how could I make this?&lt;BR /&gt;thank you so much for your support&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644111#M52602</guid>
      <dc:creator>hagar71</dc:creator>
      <dc:date>2023-05-22T10:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: color bar based on condition</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644117#M52603</link>
      <description>&lt;P&gt;Usually, events are returned from the index search in reverse time order, i.e. newest first; the dedup command will keep the first occurrence of each value in the dedup'd field(s), so this should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test
| dedup ID
... rest of your search&lt;/LI-CODE&gt;&lt;P&gt;For the drilldown to another search, you could pass the value of the colour clicked and add that a a condition in the search for the panel you are drilling down to.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-color-bar-based-on-condition/m-p/644117#M52603</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-22T10:59:23Z</dc:date>
    </item>
  </channel>
</rss>

