<?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: Hw to group the data by month in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89726#M182239</link>
    <description>&lt;P&gt;hi nravichandran&lt;BR /&gt;
did you get the solution for ur question.Even my req is to sort months which are &lt;BR /&gt;
Mar 2015,Mar2016,Apr2016,Jan2016&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 07:14:03 GMT</pubDate>
    <dc:creator>abhishekroy168</dc:creator>
    <dc:date>2018-03-06T07:14:03Z</dc:date>
    <item>
      <title>Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89720#M182233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need help in group the data by month. I have find the total count of the hosts and objects for three months. now i want to display in table for three months separtly.&lt;/P&gt;

&lt;P&gt;now the data is like below,&lt;/P&gt;

&lt;P&gt;count   300&lt;/P&gt;

&lt;P&gt;I want the results like &lt;/P&gt;

&lt;P&gt;mar apr may&lt;BR /&gt;
100 100 100&lt;/P&gt;

&lt;P&gt;How to bring this data in search?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89720#M182233</guid>
      <dc:creator>Paul_tcs</dc:creator>
      <dc:date>2013-07-09T17:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89721#M182234</link>
      <description>&lt;P&gt;Yes it's possible.&lt;/P&gt;

&lt;P&gt;Just write your query and transpose.&lt;/P&gt;

&lt;P&gt;Table month,count|transpose|fields - column|rename "row 1" as mar, .....|where  NOT LIKE(mar,"m%%")&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:51:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89721#M182234</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-09T17:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89722#M182235</link>
      <description>&lt;P&gt;will check and update you..thanks for your reply&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 18:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89722#M182235</guid>
      <dc:creator>Paul_tcs</dc:creator>
      <dc:date>2013-07-09T18:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89723#M182236</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| eval Month=strftime(_time,"%m")
| chart count by Object Month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you really want the month names, you can do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| eval Month=strftime(_time,"%b")
| chart count by Object Month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you just have one overall count&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| eval Month=strftime(_time,"%b")
| stats count by Month
| transpose 3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jul 2013 18:49:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89723#M182236</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-07-09T18:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89724#M182237</link>
      <description>&lt;P&gt;The second solution with month names sorts the months and not in the "month-order" like Jan, Feb, Mar.&lt;BR /&gt;
Is there a way to show month-wise in the order of Month like Jan 2016, Feb 2016, Mar 2016?&lt;BR /&gt;
The below query display the results alphabetic months:&lt;/P&gt;

&lt;P&gt;|eval Time=strftime(_time,"%b %Y") | stats count by Time&lt;/P&gt;

&lt;P&gt;Result:&lt;BR /&gt;
Apr 2016&lt;BR /&gt;&lt;BR /&gt;
Aug 2016&lt;BR /&gt;
Feb 2016&lt;BR /&gt;
Jan 2016&lt;BR /&gt;
Jul 2016&lt;BR /&gt;
Jun 2016&lt;BR /&gt;
Mar 2016&lt;BR /&gt;
May 2016&lt;/P&gt;

&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89724#M182237</guid>
      <dc:creator>nravichandran</dc:creator>
      <dc:date>2016-08-26T14:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89725#M182238</link>
      <description>&lt;P&gt;Ah - do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
 | eval Month=strftime(_time,"%m %b %Y")
 | chart count by Month Object
 | eval Month=replace(Month, "\d+ (.*)","\1")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This puts the month number in front for the chart command and then removes it after the chart is created. For stats, it is even easier&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
 | eval Month=strftime(_time,"%b %Y") | eval num=strftime(_time,"%m")
 | stats count by num Month Object
 | fields - num
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Jun 2017 00:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89725#M182238</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-06-27T00:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89726#M182239</link>
      <description>&lt;P&gt;hi nravichandran&lt;BR /&gt;
did you get the solution for ur question.Even my req is to sort months which are &lt;BR /&gt;
Mar 2015,Mar2016,Apr2016,Jan2016&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 07:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89726#M182239</guid>
      <dc:creator>abhishekroy168</dc:creator>
      <dc:date>2018-03-06T07:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hw to group the data by month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89727#M182240</link>
      <description>&lt;P&gt;yoursearch&lt;BR /&gt;
    |eval time1=strftime(_time,"%b-%y")&lt;BR /&gt;
    |eval time2=strftime(_time,"%Y%m")&lt;BR /&gt;
    |stats count  by time2 time1&lt;BR /&gt;
    |fields - time2&lt;/P&gt;

&lt;P&gt;This should work. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:12:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hw-to-group-the-data-by-month/m-p/89727#M182240</guid>
      <dc:creator>nikhiltyagi</dc:creator>
      <dc:date>2020-09-29T23:12:37Z</dc:date>
    </item>
  </channel>
</rss>

