<?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: How to count the unique values of an extracted field by month? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232657#M69023</link>
    <description>&lt;P&gt;Does this help you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" |timechart span=1mon values(username)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the result is the expected one, then you can adjust the search to show Month name and also &lt;CODE&gt;mvexpand&lt;/CODE&gt; to expand the list&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" |timechart span=1mon values(username) as username|mvexpand username|eval month=strftime(_time,"%b")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Jun 2016 14:11:16 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2016-06-28T14:11:16Z</dc:date>
    <item>
      <title>How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232655#M69021</link>
      <description>&lt;P&gt;We're trying to understand what our growth rate is in Nexus usage. I've been asked to find the unique number of users that log in month over month for the last year or so.&lt;/P&gt;

&lt;P&gt;The following search correctly counts the number of unique usernames over the timespan of the search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" | stats dc(username)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I've been unsuccessful in getting the results for number of unique usernames for Jan, Feb, Mar, etc. I've tried all kinds of combinations.  Can someone help?&lt;/P&gt;

&lt;P&gt;THANKS!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232655#M69021</guid>
      <dc:creator>di2esysadmin</dc:creator>
      <dc:date>2016-06-28T14:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232656#M69022</link>
      <description>&lt;P&gt;Is this what you are looking for?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp"
| bin _time span=1mon
| stats dc(username) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232656#M69022</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-06-28T14:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232657#M69023</link>
      <description>&lt;P&gt;Does this help you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" |timechart span=1mon values(username)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the result is the expected one, then you can adjust the search to show Month name and also &lt;CODE&gt;mvexpand&lt;/CODE&gt; to expand the list&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" |timechart span=1mon values(username) as username|mvexpand username|eval month=strftime(_time,"%b")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232657#M69023</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-06-28T14:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232658#M69024</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=nexs*prod* "Searching for user" source="/data/sonatype-work/nexus/logs/nexus.log*" source!="/data/sonatype-work/nexus/logs/nexus.log*.tmp" | eval date_month=strftime(_time, "%b") | chart dc(clerkID) BY host date_month
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232658#M69024</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-28T14:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232659#M69025</link>
      <description>&lt;P&gt;This works, but it provides a list of the unique users and all I need is the count.  But if I needed the list, this would do it!  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 18:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232659#M69025</guid>
      <dc:creator>di2esysadmin</dc:creator>
      <dc:date>2016-06-28T18:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232660#M69026</link>
      <description>&lt;P&gt;Hey @di2esysadmin&lt;/P&gt;

&lt;P&gt;I see you upvoted this answer, but you didn't accept it. If it did solve your question, please don't forget to resolve the post by clicking "Accept" directly below @javiergn's answer.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 00:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232660#M69026</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-06-29T00:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232661#M69027</link>
      <description>&lt;P&gt;Did this work for you?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232661#M69027</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-29T13:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232662#M69028</link>
      <description>&lt;P&gt;Sorry.  I didn't try every suggestion.   I will though.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:27:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232662#M69028</guid>
      <dc:creator>di2esysadmin</dc:creator>
      <dc:date>2016-06-29T13:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232663#M69029</link>
      <description>&lt;P&gt;Once you do, pick the best one and click &lt;CODE&gt;Answer&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232663#M69029</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-29T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the unique values of an extracted field by month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232664#M69030</link>
      <description>&lt;P&gt;ok that was extended. If you replace values(username) by dc(username) in the first search will give you the count&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 01:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-unique-values-of-an-extracted-field-by-month/m-p/232664#M69030</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-06-30T01:50:45Z</dc:date>
    </item>
  </channel>
</rss>

