<?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 sort Pivot &amp;quot;month-year&amp;quot; columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130609#M35613</link>
    <description>&lt;P&gt;Here Month = strftime(strptime(Date,"%d/%m/%Y"),"%b-%Y") &lt;/P&gt;

&lt;P&gt;so Month = "Apr-2015"&lt;/P&gt;

&lt;P&gt;When i set   Month = strftime(strptime(Date,"%d/%m/%Y"),"%m-%Y") &lt;/P&gt;

&lt;P&gt;so Month = "04-2015" and it will sort the columns properly but again i need to rename the   "04-2015" to  "Apr-2015" like that for all dynamic columns for the month&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2015 07:44:01 GMT</pubDate>
    <dc:creator>Vijaikanth</dc:creator>
    <dc:date>2015-05-29T07:44:01Z</dc:date>
    <item>
      <title>How to sort Pivot "month-year" columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130608#M35612</link>
      <description>&lt;P&gt;Requirement: We need the order of Month column names to start with the three letter month followed by year in ascending order. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Request Name    Nov-2014    Dec-2014    Jan-2015    Feb-2015    Mar-2015
Get                50          10          20          20          40
Post               15          5           45          23          34
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, while doing the Pivot, the columns are getting sorted by the string value in alphabetical order and the output is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Request Name    Dec-2014    Feb-2015    Jan-2015    Mar-2015    Nov-2014
Get                10          20          20          40          50
Post                5          23          45          34          15
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i rearrange the columns to point in ascending order.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 07:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130608#M35612</guid>
      <dc:creator>Vijaikanth</dc:creator>
      <dc:date>2015-05-29T07:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort Pivot "month-year" columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130609#M35613</link>
      <description>&lt;P&gt;Here Month = strftime(strptime(Date,"%d/%m/%Y"),"%b-%Y") &lt;/P&gt;

&lt;P&gt;so Month = "Apr-2015"&lt;/P&gt;

&lt;P&gt;When i set   Month = strftime(strptime(Date,"%d/%m/%Y"),"%m-%Y") &lt;/P&gt;

&lt;P&gt;so Month = "04-2015" and it will sort the columns properly but again i need to rename the   "04-2015" to  "Apr-2015" like that for all dynamic columns for the month&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 07:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130609#M35613</guid>
      <dc:creator>Vijaikanth</dc:creator>
      <dc:date>2015-05-29T07:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort Pivot "month-year" columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130610#M35614</link>
      <description>&lt;P&gt;And that's the way you should do it, Splunk is not aware that Feb is equal the &lt;CODE&gt;02&lt;/CODE&gt; months and sorts it based on the alphanumeric value. If you need to sort it like this, you provided the answer yourself &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2015 22:09:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130610#M35614</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-05-30T22:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort Pivot "month-year" columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130611#M35615</link>
      <description>&lt;P&gt;Yes. If we set the Month as "04-2015" instead of "Apr-2015" we can able to sort it. But after that how to rename the value &lt;/P&gt;

&lt;P&gt;"04-2015" to "Apr-2015".&lt;/P&gt;

&lt;P&gt;Is it possible to apply wildcard characters in the column names?  like  Rename  04* as Apr  (or) doing some substring on the Column name and rename ?&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2015 16:44:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130611#M35615</guid>
      <dc:creator>Vijaikanth</dc:creator>
      <dc:date>2015-05-31T16:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort Pivot "month-year" columns in ascending chronological order (ex: Nov-2014, Dec-2014, Jan-2015, etc)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130612#M35616</link>
      <description>&lt;P&gt;Finally Solved the chronological order in the Format &lt;/P&gt;

&lt;P&gt;Month = strftime(strptime(Date,"%d/%m/%Y"),"%Y-%m (%b)")&lt;/P&gt;

&lt;P&gt;so the Result will be  2015-01 (Jan), 2015-02 (Feb).....&lt;/P&gt;

&lt;P&gt;It Works fine for all year, all month... &lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 07:32:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-Pivot-quot-month-year-quot-columns-in-ascending/m-p/130612#M35616</guid>
      <dc:creator>Vijaikanth</dc:creator>
      <dc:date>2015-07-16T07:32:53Z</dc:date>
    </item>
  </channel>
</rss>

