<?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: Column chart colors based on percentage of value in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502680#M61867</link>
    <description>&lt;P&gt;Example search tested in Splunk 7.3.1 using &lt;CODE&gt;makeresults&lt;/CODE&gt;, &lt;CODE&gt;eval&lt;/CODE&gt;, and &lt;CODE&gt;append&lt;/CODE&gt; commands to generate example data (three events, each with two fields: &lt;CODE&gt;Day&lt;/CODE&gt; and &lt;CODE&gt;Errors&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults 
| eval Day="Daybeforethat", Errors=20
| append 
    [| makeresults 
    | eval Day="Yesterday", Errors=40 ] 
| append 
    [| makeresults 
    | eval Day="Today", Errors=80 ] 
| eval Good = if(Errors &amp;lt;= 30,'Errors',null), Bad = if((Errors &amp;gt; 30) AND (Errors &amp;lt;= 50),'Errors',null), Ugly = if((Errors &amp;gt; 50),'Errors',null)
| table Day, Good, Bad, Ugly
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Given existing search-based results with the same structure—three rows (one for each day), each with two fields ( &lt;CODE&gt;Day&lt;/CODE&gt; and &lt;CODE&gt;Errors&lt;/CODE&gt;)—the search effectively consists of just the last two commands ( &lt;CODE&gt;eval Good ...&lt;/CODE&gt; and &lt;CODE&gt;table&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;Significant charting options ( &lt;CODE&gt;chart.stackMode&lt;/CODE&gt; and &lt;CODE&gt;fieldColors&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
&amp;lt;option name="charting.fieldColors"&amp;gt;{"Good": 0x66cc66, "Bad": 0xcccc66, "Ugly": 0xcc6666}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Example chart:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7808iBF640BC928A502EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The "trick":&lt;/STRONG&gt; For each day, calculate values for Good, Bad, and Ugly. Only specify a value for the applicable field; leave the other two null. For example, If a value is "Good", leave the Bad and Ugly fields null. Each day will have only a Good, Bad, or Ugly value. Stack these field values. Each stack will have only a single value, with the appropriate color.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Nit:&lt;/STRONG&gt; The data value appears &lt;EM&gt;inside&lt;/EM&gt; the bar rather than on top. This is a consequence of stacking. Sorry.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 08:51:25 GMT</pubDate>
    <dc:creator>Graham_Hanningt</dc:creator>
    <dc:date>2019-10-21T08:51:25Z</dc:date>
    <item>
      <title>Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502678#M61865</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I've made a couple of colomn charts to monitor healthy machines. But I would like to give the bars certain colors based on a % of unhealthy machines. I tried to google this but I didn't find something that would work for me. &lt;/P&gt;

&lt;P&gt;The searches are as followed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=linux host=*test* earliest=-1d@d latest=@d "healthcheck: System not healthy" | dedup host | stats count by host
| stats count as TotalA
| appendcols 
[search index=linux host=*test* earliest=@d latest=now "healthcheck: System not healthy" | dedup host | stats count by host 
| stats count as TotalB]
| appendcols 
[search index=linux host=*test* earliest=-2d@d latest=-1d@d "healthcheck: System not healthy" | dedup host | stats count by host 
| stats count as TotalC]
| eval Yesterday=TotalA 
| eval Today=TotalB
| eval Daybeforethat=TotalC
| fields HealthchecksError, Daybeforethat, Yesterday, Today
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search gives the following chart:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7810i3A7247623441B775/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;These colors are added with the following option:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[0xFFA07A,0xF08080,0xCD5C5C]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I want to base the colors on a percentage of the values given by the search, should I add this as an option? Or is this supposed to be written in the search? If someone could help me out with, for example, turn color red if percentage is &amp;gt;10?&lt;/P&gt;

&lt;P&gt;I've used the static color changes before in the source code but with a growing company, this isn't efficient.&lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;New pictures&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7811iA391F3161C0B0E8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 09:14:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502678#M61865</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-17T09:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502679#M61866</link>
      <description>&lt;P&gt;Could anyone maybe help me out?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 07:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502679#M61866</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-21T07:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502680#M61867</link>
      <description>&lt;P&gt;Example search tested in Splunk 7.3.1 using &lt;CODE&gt;makeresults&lt;/CODE&gt;, &lt;CODE&gt;eval&lt;/CODE&gt;, and &lt;CODE&gt;append&lt;/CODE&gt; commands to generate example data (three events, each with two fields: &lt;CODE&gt;Day&lt;/CODE&gt; and &lt;CODE&gt;Errors&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults 
| eval Day="Daybeforethat", Errors=20
| append 
    [| makeresults 
    | eval Day="Yesterday", Errors=40 ] 
| append 
    [| makeresults 
    | eval Day="Today", Errors=80 ] 
| eval Good = if(Errors &amp;lt;= 30,'Errors',null), Bad = if((Errors &amp;gt; 30) AND (Errors &amp;lt;= 50),'Errors',null), Ugly = if((Errors &amp;gt; 50),'Errors',null)
| table Day, Good, Bad, Ugly
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Given existing search-based results with the same structure—three rows (one for each day), each with two fields ( &lt;CODE&gt;Day&lt;/CODE&gt; and &lt;CODE&gt;Errors&lt;/CODE&gt;)—the search effectively consists of just the last two commands ( &lt;CODE&gt;eval Good ...&lt;/CODE&gt; and &lt;CODE&gt;table&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;Significant charting options ( &lt;CODE&gt;chart.stackMode&lt;/CODE&gt; and &lt;CODE&gt;fieldColors&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
&amp;lt;option name="charting.fieldColors"&amp;gt;{"Good": 0x66cc66, "Bad": 0xcccc66, "Ugly": 0xcc6666}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Example chart:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7808iBF640BC928A502EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The "trick":&lt;/STRONG&gt; For each day, calculate values for Good, Bad, and Ugly. Only specify a value for the applicable field; leave the other two null. For example, If a value is "Good", leave the Bad and Ugly fields null. Each day will have only a Good, Bad, or Ugly value. Stack these field values. Each stack will have only a single value, with the appropriate color.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Nit:&lt;/STRONG&gt; The data value appears &lt;EM&gt;inside&lt;/EM&gt; the bar rather than on top. This is a consequence of stacking. Sorry.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 08:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502680#M61867</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T08:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502681#M61868</link>
      <description>&lt;P&gt;"Daybeforethat" (your term) = "The day before yesterday" = "Eergisteren" (Dutch), right?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502681#M61868</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T09:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502682#M61869</link>
      <description>&lt;P&gt;If you wanted to expose the good/bad/ugly thresholds to the dashboard user, you could include the thresholds in the field names. For example, instead of the field name &lt;CODE&gt;Good&lt;/CODE&gt;, use the field name &lt;CODE&gt;Good (&amp;lt; 30)&lt;/CODE&gt; (or &lt;CODE&gt;... (&amp;lt; 30%)&lt;/CODE&gt;: for various reasons, including simplicity, I deliberately kept the term "percentage" out of my answer).&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502682#M61869</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T09:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502683#M61870</link>
      <description>&lt;P&gt;I deliberately confined my answer to Simple XML, without delving into JavaScript.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502683#M61870</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T09:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502684#M61871</link>
      <description>&lt;P&gt;Yea, I had some Dutch words in the search but I forgot to edit the picture.. That's why it's Dutch in the image.&lt;BR /&gt;
Today&lt;BR /&gt;
Yesterday&lt;BR /&gt;
Daybeforethat&lt;/P&gt;

&lt;P&gt;Vandaag&lt;BR /&gt;
Gisteren&lt;BR /&gt;
Eersgisteren&lt;/P&gt;

&lt;P&gt;In that order indeed.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502684#M61871</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-21T09:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502685#M61872</link>
      <description>&lt;P&gt;Thanks a lot for the comprehensive answer! &lt;BR /&gt;
So I would need to add these 2 lines to my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval Good = if(Errors &amp;lt;= 30,'Errors',null), Bad = if((Errors &amp;gt; 30) AND (Errors &amp;lt;= 50),'Errors',null), Ugly = if((Errors &amp;gt; 50),'Errors',null)
     | table Day, Good, Bad, Ugly
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The table line will replace the fields line, right? (Line 12). Also, af of right now, you made some results with &lt;CODE&gt;makeresults&lt;/CODE&gt;&lt;BR /&gt;
In order to create an example, the good, bad and ugly examples are static values right? Would it be possible to do something like:&lt;BR /&gt;
Good = &amp;lt; 5%&lt;BR /&gt;
Bad = &amp;lt; 20%&lt;BR /&gt;
Ugly = &amp;lt; 30 %&lt;BR /&gt;
Instead of static values? &lt;BR /&gt;
Again, thanks a lot for the help! I'm quite new with Splunk so maybe I'm asking some obvious questions, but I would really like to learn.&lt;/P&gt;

&lt;P&gt;Edit: Maybe we should focus more on getting the search to work like your example. I can always later on change from static values to percentages I think..&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:35:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502685#M61872</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-21T09:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502686#M61873</link>
      <description>&lt;P&gt;You're welcome!&lt;/P&gt;

&lt;P&gt;You wrote:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;So I would need to add these 2 lines to my search&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Yes, but it's not quite that simple.&lt;/P&gt;

&lt;P&gt;If I interpret your original search correctly, it uses the &lt;CODE&gt;appendcols&lt;/CODE&gt; command to append columns to a single event. By contrast, my answer requires that you have three events: one per day, each with two fields ( &lt;CODE&gt;Day&lt;/CODE&gt; and &lt;CODE&gt;Errors&lt;/CODE&gt;). You need to reproduce that structure based on searching your ingested events, rather than generating them as I have done using &lt;CODE&gt;makeresults&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I don't have your data, so I would have some trouble providing you with a complete replacement for your search that would be guaranteed to work. You need to do some work to adapt my &lt;CODE&gt;makeresults&lt;/CODE&gt;-based example. Tip: use &lt;CODE&gt;append&lt;/CODE&gt;, as in my example, instead of &lt;CODE&gt;appendcols&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Copy my example search into the default Splunk Search app, excluding the last &lt;CODE&gt;eval Good...&lt;/CODE&gt; and &lt;CODE&gt;table&lt;/CODE&gt; commands, and view the tabular results in the Statistics tab. Your search needs to reproduce that structure.&lt;/P&gt;

&lt;P&gt;That is, you need to reproduce the structure of the results of the following search (identical to my example in the answer, but with the last &lt;CODE&gt;eval Good...&lt;/CODE&gt; and &lt;CODE&gt;table&lt;/CODE&gt; commands replaced with a single &lt;CODE&gt;table&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Day="Daybeforethat", Errors=20
| append 
    [| makeresults 
    | eval Day="Yesterday", Errors=40 ] 
| append 
    [| makeresults 
    | eval Day="Today", Errors=80 ] 
| table Day, Errors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(The &lt;CODE&gt;table&lt;/CODE&gt; command is really only there to exclude the unwanted &lt;CODE&gt;_time&lt;/CODE&gt; field generated by &lt;CODE&gt;makeresults&lt;/CODE&gt;. I could have used &lt;CODE&gt;fields - _time&lt;/CODE&gt; to do the same thing.)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502686#M61873</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T13:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502687#M61874</link>
      <description>&lt;P&gt;Re:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;the good, bad and ugly examples are static values right?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Yes. I arbitrarily set thresholds at 30 and 50: less than or equal to 30 is "good", greater than 30 and less than or equal to 50 is "bad", greater than 50 is "ugly".&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Would it be possible to do something like ... Instead of static values?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Yes.&lt;/P&gt;

&lt;P&gt;However, a specific answer would depend on which method you want to use to specify the threshold values. For example: macro, token, lookup, search?&lt;/P&gt;

&lt;P&gt;In yet more detail, if the answer is "token": do you want dashboard UI controls that set tokens for the threshold values, and for those tokens to be used in your search?&lt;/P&gt;

&lt;P&gt;This is veering off the subject of your original question, and I suspect there will be existing answers (and Splunk docs) that cover this, but I'm happy to help as far as I can.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 14:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502687#M61874</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T14:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502688#M61875</link>
      <description>&lt;P&gt;I wish Splunk Simple XML allowed token references in the XML element content for chart options such as &lt;CODE&gt;fieldColors&lt;/CODE&gt;. That might allow the possibility of alternative answers without this "stacking" kludge. I can dream. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 14:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502688#M61875</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-21T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502689#M61876</link>
      <description>&lt;P&gt;Jony, To make it easier for other users to find this question in the future, would you mind correcting the typo: replace "Colomn" with "Column"?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 01:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502689#M61876</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-22T01:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502690#M61877</link>
      <description>&lt;P&gt;Goodmorning Graham,&lt;/P&gt;

&lt;P&gt;Thanks for the info, after some research I decided to stick with static values for now. My search basicly counts the number of unhealthy hosts per day and counts them on the name of the day. For example, 1 day ago until now = today.&lt;/P&gt;

&lt;P&gt;So I end up with 3 variables with the number of unhealthy systems summed up. If I understand correctly, I would need to make a new variable where I count all the unhealthy systems instead of 3 different variables. And compare that variable like you did with "Error".. Would this be a correct aproach? Or should I just use the 3 days and compare those? &lt;/P&gt;

&lt;P&gt;Hope my question is clear.. I understand your search but for now I'm not sure what would be the best way for me to implement it in mine..&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 08:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502690#M61877</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-22T08:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502691#M61878</link>
      <description>&lt;P&gt;So I'm trying out my search with your information and I did the following:&lt;BR /&gt;
Used "Errors" to count all the unhealthy systems and used "Day" to sum up all days.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=linux host=test* earliest=-1d@d latest=@d "healthcheck: System not healthy" | dedup host | stats count by host
| stats count as Errors | eval Day="Yesterday"
| appendcols 
[search index=linux host=test* earliest=@d latest=now "healthcheck: System not healthy" | dedup host | stats count by host 
| stats count as Errors] | eval Day="Today"
| appendcols 
[search index=linux host=test* earliest=-2d@d latest=-1d@d "healthcheck: System not healthy" | dedup host | stats count by host 
| stats count as Errors] | eval Day="Daybeforethat"
| eval Good = if(Errors &amp;lt;= 30,'Errors',null), Bad = if((Errors &amp;gt; 30) AND (Errors &amp;lt;= 50),'Errors',null), Ugly = if((Errors &amp;gt; 50),'Errors',null)
| table Day, Good, Bad, Ugly
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Look in my original post for a picture, I can only use pictures locally saved.. But in my original post is an picture of the result.. Seems like the variables are being replaced each search.. Unlike your example where each day is visible..&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 09:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502691#M61878</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-22T09:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502692#M61879</link>
      <description>&lt;P&gt;Hi Graham, I finally got it to work! I only need to speak with my department about deciding on which numbers we are going to choose for each color. &lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 12:20:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502692#M61879</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-22T12:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502693#M61880</link>
      <description>&lt;P&gt;Well done! Sorry for the delay, I &lt;EM&gt;was&lt;/EM&gt; about to reply. I'm glad you beat me to it.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 01:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502693#M61880</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2019-10-23T01:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Column chart colors based on percentage of value</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502694#M61881</link>
      <description>&lt;P&gt;My bad, fixed the typo. I will also your accept your comment as solution to my question. Thanks a lot for all the assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 08:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Column-chart-colors-based-on-percentage-of-value/m-p/502694#M61881</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-10-23T08:10:37Z</dc:date>
    </item>
  </channel>
</rss>

