<?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 a report to give me top 20 MAX values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187887#M54149</link>
    <description>&lt;P&gt;@esix_splunk,&lt;BR /&gt;
I tried what you suggested but &lt;STRONG&gt;stat max&lt;/STRONG&gt; only give you 1 value which is the highest one,&lt;BR /&gt;
it can't give you multiple values (20) like I want.&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2015 08:33:07 GMT</pubDate>
    <dc:creator>sraguan</dc:creator>
    <dc:date>2015-05-14T08:33:07Z</dc:date>
    <item>
      <title>How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187883#M54145</link>
      <description>&lt;P&gt;I have a report that showing me the top 20 of field called &lt;STRONG&gt;"sc_bytes"&lt;/STRONG&gt; (By count),&lt;/P&gt;

&lt;P&gt;&amp;gt; &amp;gt;   source="xap.csv" | top limit=20  sc_bytes&lt;/P&gt;

&lt;P&gt;So this is what I get:&lt;/P&gt;

&lt;P&gt;sc_bytes             cs_uri_stem                                   Count         percent&lt;BR /&gt;
992           /messagebroker/amfpolling.wlforward                 433769    16.32443&lt;BR /&gt;
1245          /messagebroker/amfpolling.wlforward                 72714     14.026691&lt;BR /&gt;
276           /messagebroker/amfpolling.wlforward                 217028    8.167615&lt;BR /&gt;
927           /messagebroker/amfpolling.wlforward                 119193    4.4857&lt;/P&gt;

&lt;P&gt;but I want to see the top 20 of field called &lt;STRONG&gt;"sc_bytes"&lt;/STRONG&gt;  By the MAXIMUM value of the field itself and not by count.&lt;BR /&gt;
So it will look like this:&lt;/P&gt;

&lt;P&gt;sc_bytes             cs_uri_stem                                   Count         percent&lt;BR /&gt;
1245          /messagebroker/amfpolling.wlforward                 72714     14.026691&lt;BR /&gt;
992           /messagebroker/amfpolling.wlforward                 433769    16.32443&lt;BR /&gt;
927           /messagebroker/amfpolling.wlforward                 119193    4.4857&lt;BR /&gt;
276           /messagebroker/amfpolling.wlforward                 217028    8.167615&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187883#M54145</guid>
      <dc:creator>sraguan</dc:creator>
      <dc:date>2020-09-28T19:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187884#M54146</link>
      <description>&lt;P&gt;It looks like your second example is just a re-sort of your first example.  If that's all you need then add a sort to your search: &lt;CODE&gt;source="xap.csv" | top limit=20 sc_bytes | sort -sc_bytes&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 18:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187884#M54146</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-05-13T18:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187885#M54147</link>
      <description>&lt;P&gt;Thanks @richgalloway  , &lt;BR /&gt;
the sort really did sorted the top 20 but I have 2 million events  in this search and he sorted the top 20 that had the highest count.&lt;BR /&gt;
I want to sort the top 20 events that has the highest (MAX) &lt;STRONG&gt;sc_bytes&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2015 07:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187885#M54147</guid>
      <dc:creator>sraguan</dc:creator>
      <dc:date>2015-05-14T07:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187886#M54148</link>
      <description>&lt;P&gt;This perhaps?&lt;/P&gt;

&lt;P&gt;.... | stats count max(sc_bytes) as max | top limit=20 max&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2015 08:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187886#M54148</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-05-14T08:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187887#M54149</link>
      <description>&lt;P&gt;@esix_splunk,&lt;BR /&gt;
I tried what you suggested but &lt;STRONG&gt;stat max&lt;/STRONG&gt; only give you 1 value which is the highest one,&lt;BR /&gt;
it can't give you multiple values (20) like I want.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2015 08:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187887#M54149</guid>
      <dc:creator>sraguan</dc:creator>
      <dc:date>2015-05-14T08:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187888#M54150</link>
      <description>&lt;P&gt;Yes, need to group this by something. Such as host, interface, etc..&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2015 08:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187888#M54150</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-05-14T08:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187889#M54151</link>
      <description>&lt;P&gt;I'm not sure i'm getting what you are saying (newbie in splunk),&lt;BR /&gt;
is there a &lt;STRONG&gt;group&lt;/STRONG&gt; command? &lt;BR /&gt;
or even better - can you please write the search query that can give me the output that I want?&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2015 08:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187889#M54151</guid>
      <dc:creator>sraguan</dc:creator>
      <dc:date>2015-05-14T08:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort a report to give me top 20 MAX values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187890#M54152</link>
      <description>&lt;P&gt;got it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="xap.csv"  | fields sc_bytes | sort -sc_bytes  | head 20| top limit=20 sc_bytes
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 May 2015 11:10:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-a-report-to-give-me-top-20-MAX-values/m-p/187890#M54152</guid>
      <dc:creator>sraguan</dc:creator>
      <dc:date>2015-05-14T11:10:04Z</dc:date>
    </item>
  </channel>
</rss>

