<?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: Display a time chart for the distinct count of values in a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453678#M128381</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo (host=abc OR host=xyz) Computer=* | timechart span=1mon dc(Computer) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 May 2019 12:59:43 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-05-15T12:59:43Z</dc:date>
    <item>
      <title>Display a time chart for the distinct count of values in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453675#M128378</link>
      <description>&lt;P&gt;I am beginner to Splunk and could you help me with the following scenario.&lt;/P&gt;

&lt;P&gt;Lets take I have a table with the field name "Computer".  &lt;/P&gt;

&lt;P&gt;The field Name "Computer" when searched for different time period gives me different values. &lt;/P&gt;

&lt;P&gt;When I search for April the result is : a,b,c,d,c&lt;BR /&gt;
When I search for May the result is : a,b,c,d,e,f,a,b &lt;/P&gt;

&lt;P&gt;So the distinct count for April is &lt;STRONG&gt;4&lt;/STRONG&gt; and for May is &lt;STRONG&gt;6&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I would like to create a chart which shows the following.&lt;/P&gt;

&lt;P&gt;April   -  4&lt;BR /&gt;
May    -  6&lt;/P&gt;

&lt;P&gt;What search query could I use to display such a chart which shows me the distinct count of field "Computer" on a monthly basis.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 12:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453675#M128378</guid>
      <dc:creator>veerappan</dc:creator>
      <dc:date>2019-05-13T12:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display a time chart for the distinct count of values in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453676#M128379</link>
      <description>&lt;P&gt;The &lt;CODE&gt;timechart&lt;/CODE&gt; command has a function for that purpose called &lt;CODE&gt;distinct_count&lt;/CODE&gt; (usually, the &lt;CODE&gt;dc&lt;/CODE&gt; abbreviation is used).&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo Computer=* | timechart span=1mon dc(Computer)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 13:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453676#M128379</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-13T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Display a time chart for the distinct count of values in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453677#M128380</link>
      <description>&lt;P&gt;Thanks @richgalloway for the answer.&lt;/P&gt;

&lt;P&gt;Probably can you help me with one more question ?&lt;/P&gt;

&lt;P&gt;If I have two different search criteria like the following &lt;BR /&gt;
index=foo host = abc Computer=* | timechart span=1mon dc(Computer)&lt;BR /&gt;
index= foo host = xyz Computer=* | timechart span=1mon dc(Computer)&lt;/P&gt;

&lt;P&gt;Can I integrate both of these into a same chart ?&lt;BR /&gt;
I would like display the results of different criteria as different columns in the same chart. Is that possible with the above query ? &lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 14:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453677#M128380</guid>
      <dc:creator>veerappan</dc:creator>
      <dc:date>2019-05-14T14:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display a time chart for the distinct count of values in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453678#M128381</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo (host=abc OR host=xyz) Computer=* | timechart span=1mon dc(Computer) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 May 2019 12:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453678#M128381</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-15T12:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display a time chart for the distinct count of values in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453679#M128382</link>
      <description>&lt;P&gt;Thanks it works perfectly&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 05:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-a-time-chart-for-the-distinct-count-of-values-in-a-field/m-p/453679#M128382</guid>
      <dc:creator>veerappan</dc:creator>
      <dc:date>2019-05-16T05:15:42Z</dc:date>
    </item>
  </channel>
</rss>

