<?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 search the count of a field with multiple values by day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129840#M35311</link>
    <description>&lt;P&gt;Thanks for your reply.  I gave it a try, but I'm not quite sure what "mvexpand" is supposed to do.  The results look similar to what I had originally.  &lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2015 13:44:43 GMT</pubDate>
    <dc:creator>jjc42</dc:creator>
    <dc:date>2015-04-09T13:44:43Z</dc:date>
    <item>
      <title>How to search the count of a field with multiple values by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129836#M35307</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm new to Splunk, so please bear with me.  I'm trying to get a count of a field with multiple values by day.  As an example, the field is &lt;CODE&gt;Product_Name&lt;/CODE&gt;.  &lt;CODE&gt;Product_Name&lt;/CODE&gt; can have values such as "iPhone", "iPad", "MacBook" and so on.  The number of values is in the hundreds (possibly thousands).  I'd like a count of &lt;CODE&gt;Product_Name&lt;/CODE&gt; by day (for the last 30 days) that I can then export to Excel.  The following seemed to get me the closest:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product_Name="*" | timechart count by Product_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This doesn't group the results by day (I tried &lt;CODE&gt;bucket _time span=1d&lt;/CODE&gt;, but it didn't seem to work).  It also doesn't include the full list of values (only about a dozen) and the export option is not available.  &lt;/P&gt;

&lt;P&gt;The following provides the full list with count, but is not by day:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product_Name="*" | top limit=10000 Product_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks very much for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2015 17:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129836#M35307</guid>
      <dc:creator>jjc42</dc:creator>
      <dc:date>2015-04-07T17:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field with multiple values by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129837#M35308</link>
      <description>&lt;P&gt;You were really close. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product_Name="*" | timechart span=1d count by Product_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have more than 10 product names, after those 10 it'll roll the rest up in an "OTHER" column which you might not want.  To remove that "OTHER" column you want this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product_Name="*" | timechart span=1d count by Product_Name limit=100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which technically doesn't remove the possibility of OTHER, it just raises the threshold from 10 to 100. &lt;/P&gt;

&lt;P&gt;If you can make the time, it may be worth spending some time with the search manual &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/Search/Whatsinthismanual"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/Search/Whatsinthismanual&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or if it's more your style, the Search Tutorial. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchTutorial/WelcometotheSearchTutorial"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchTutorial/WelcometotheSearchTutorial&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2015 18:19:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129837#M35308</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-04-07T18:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field with multiple values by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129838#M35309</link>
      <description>&lt;P&gt;Hi jjc42,&lt;/P&gt;

&lt;P&gt;If i understand your problem, try with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Product_Name="*"| timechart span=1d  count by Product_Name  |mvexpand  Product_Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Apr 2015 18:23:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129838#M35309</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-04-07T18:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field with multiple values by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129839#M35310</link>
      <description>&lt;P&gt;That works.  Thanks!  And thanks for the links.  I'll take a look.  &lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 13:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129839#M35310</guid>
      <dc:creator>jjc42</dc:creator>
      <dc:date>2015-04-09T13:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field with multiple values by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129840#M35311</link>
      <description>&lt;P&gt;Thanks for your reply.  I gave it a try, but I'm not quite sure what "mvexpand" is supposed to do.  The results look similar to what I had originally.  &lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 13:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-with-multiple-values-by-day/m-p/129840#M35311</guid>
      <dc:creator>jjc42</dc:creator>
      <dc:date>2015-04-09T13:44:43Z</dc:date>
    </item>
  </channel>
</rss>

