<?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 Sorting bucketed data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sorting-bucketed-data/m-p/105772#M27466</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have a requirement to show data in bucketed format.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Avg Data Delivered    Count
&amp;lt; 50 MB               3450
&amp;lt; 100 MB              200
&amp;lt; 250 MB              350
&amp;lt; 500 MB              1000
&amp;lt; 1 GB                120
&amp;gt; 1 GB                55
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem we are facing is: Since the data gets sorted as string, 100 MB appears first and then 50 MB.. and so on... How to render the results as mentioned in example above. Basically i would like to disable default sorting.&lt;/P&gt;

&lt;P&gt;One option i thought is to use python scripts. Format the data in script and then render it on screen. I would like to know if there is an option in splunk query itself.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2013 06:58:17 GMT</pubDate>
    <dc:creator>strive</dc:creator>
    <dc:date>2013-04-25T06:58:17Z</dc:date>
    <item>
      <title>Sorting bucketed data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-bucketed-data/m-p/105772#M27466</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have a requirement to show data in bucketed format.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Avg Data Delivered    Count
&amp;lt; 50 MB               3450
&amp;lt; 100 MB              200
&amp;lt; 250 MB              350
&amp;lt; 500 MB              1000
&amp;lt; 1 GB                120
&amp;gt; 1 GB                55
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem we are facing is: Since the data gets sorted as string, 100 MB appears first and then 50 MB.. and so on... How to render the results as mentioned in example above. Basically i would like to disable default sorting.&lt;/P&gt;

&lt;P&gt;One option i thought is to use python scripts. Format the data in script and then render it on screen. I would like to know if there is an option in splunk query itself.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 06:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-bucketed-data/m-p/105772#M27466</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-04-25T06:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting bucketed data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-bucketed-data/m-p/105773#M27467</link>
      <description>&lt;P&gt;Well you need SOME way of sorting so just "disabling" the default sorting wouldn't be enough. What I think you should do is to convert the "Avg Data Delivered" values to something where all quantities share a common unit, like KB for instance. You could do this using &lt;CODE&gt;convert&lt;/CODE&gt;'s &lt;CODE&gt;memk()&lt;/CODE&gt; function (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Convert"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Convert&lt;/A&gt; ). This will let you sort your data correctly. I suspect you still want to SHOW the data just like now though - in which case you could use &lt;CODE&gt;fieldformat&lt;/CODE&gt; to set that up.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 07:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-bucketed-data/m-p/105773#M27467</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-25T07:15:28Z</dc:date>
    </item>
  </channel>
</rss>

