<?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: two values in piechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303251#M165698</link>
    <description>&lt;P&gt;I have something like this as output:&lt;/P&gt;

&lt;P&gt;days       count&lt;BR /&gt;
0              16&lt;BR /&gt;
2               3&lt;BR /&gt;
7               33&lt;BR /&gt;
16             9&lt;BR /&gt;
17             3&lt;BR /&gt;
etc.. . What ik would like is to have two values voor the piechart. In this case count of 52 for &amp;lt;14 days and a count of 12 for &amp;gt; 14 days. In this way ik can represent two values in the chart&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2017 11:39:45 GMT</pubDate>
    <dc:creator>Mike6960</dc:creator>
    <dc:date>2017-10-11T11:39:45Z</dc:date>
    <item>
      <title>two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303249#M165696</link>
      <description>&lt;P&gt;In my search ik got a field called 'days' . This field is generated through counting the number of days between two different dates. If i use this field in a pie chart ik see (of course) all the different values (e.g. 0 , 1, 16,321 etc.) and the count of these. I would like to generate a piechart with only two counts. number of count &amp;lt;14 days and number of count  &amp;gt;14 days . Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 10:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303249#M165696</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-10-11T10:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303250#M165697</link>
      <description>&lt;P&gt;@Mike6960, can you please add more details about what you have and what you want. Possibly some mock data from current table and required table. Do you need something like this? Since you have asked for a pie chart I am hoping there should be multiple rows in your required table.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;days      count
14          20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Oct 2017 11:26:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303250#M165697</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-11T11:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303251#M165698</link>
      <description>&lt;P&gt;I have something like this as output:&lt;/P&gt;

&lt;P&gt;days       count&lt;BR /&gt;
0              16&lt;BR /&gt;
2               3&lt;BR /&gt;
7               33&lt;BR /&gt;
16             9&lt;BR /&gt;
17             3&lt;BR /&gt;
etc.. . What ik would like is to have two values voor the piechart. In this case count of 52 for &amp;lt;14 days and a count of 12 for &amp;gt; 14 days. In this way ik can represent two values in the chart&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 11:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303251#M165698</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-10-11T11:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303252#M165699</link>
      <description>&lt;P&gt;Try something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search that gets days 
| stats count as daycount by days
| eval days = if(days&amp;lt;=14,"14-","15+")
| stats sum(daycount) as daycount by days
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;My practice is to always rename the &lt;CODE&gt;count&lt;/CODE&gt; field if anything is going to happen with it other than presentation.  This avoids the potential situation where in a later &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;timestats&lt;/CODE&gt; either you or Splunk might get confused as to which &lt;CODE&gt;count&lt;/CODE&gt; you are talking about, the one that came out of a prior step or the one it is calculating itself.  &lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 12:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303252#M165699</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-11T12:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303253#M165700</link>
      <description>&lt;P&gt;Thank you for your help. In your example you already did a rename or do i understand you wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 14:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303253#M165700</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-10-11T14:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: two values in piechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303254#M165701</link>
      <description>&lt;P&gt;Yes...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count as daycount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...calculates the count, but calls it daycount.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-values-in-piechart/m-p/303254#M165701</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-11T18:43:58Z</dc:date>
    </item>
  </channel>
</rss>

