<?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: search help - stats of a count by that field... but in band ranges? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89965#M23084</link>
    <description>&lt;P&gt;I think the only way you are going to be able to group results in that way is by using the rangemap command. &lt;/P&gt;

&lt;P&gt;index=myindex | somefilter | stats count(field) by field | rangemap field=yourfield Great=1-200 Good=201-400 Acceptable=401-600 default=Slow &lt;/P&gt;

&lt;P&gt;or maybe this&lt;/P&gt;

&lt;P&gt;index=myindex | somefilter | rangemap field=yourfield Great=1-200 Good=201-400 Acceptable=401-600 default=Slow | stats count(field) by field &lt;/P&gt;

&lt;P&gt;You can adjust the ranges to your liking. Let me know if this works. &lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2011 19:22:46 GMT</pubDate>
    <dc:creator>RicoSuave</dc:creator>
    <dc:date>2011-04-27T19:22:46Z</dc:date>
    <item>
      <title>search help - stats of a count by that field... but in band ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89964#M23083</link>
      <description>&lt;P&gt;i need some search help...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | somefilter | stats count(field) by field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me close to what i want... &lt;/P&gt;

&lt;P&gt;but i want the counts of that field between certain defined ranges...  like count(field) &amp;gt; 50 and &amp;lt; 500 or something.&lt;/P&gt;

&lt;P&gt;Any thoughts? I expect it's easy &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;TIA,&lt;BR /&gt;
   Kirby&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2011 16:41:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89964#M23083</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2011-04-27T16:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: search help - stats of a count by that field... but in band ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89965#M23084</link>
      <description>&lt;P&gt;I think the only way you are going to be able to group results in that way is by using the rangemap command. &lt;/P&gt;

&lt;P&gt;index=myindex | somefilter | stats count(field) by field | rangemap field=yourfield Great=1-200 Good=201-400 Acceptable=401-600 default=Slow &lt;/P&gt;

&lt;P&gt;or maybe this&lt;/P&gt;

&lt;P&gt;index=myindex | somefilter | rangemap field=yourfield Great=1-200 Good=201-400 Acceptable=401-600 default=Slow | stats count(field) by field &lt;/P&gt;

&lt;P&gt;You can adjust the ranges to your liking. Let me know if this works. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89965#M23084</guid>
      <dc:creator>RicoSuave</dc:creator>
      <dc:date>2011-04-27T19:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: search help - stats of a count by that field... but in band ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89966#M23085</link>
      <description>&lt;P&gt;Kirby,&lt;/P&gt;

&lt;P&gt;Do you just want to display results that are between these two values (so the counted number, not the field)? This should help:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | somefilter | stats count(field) AS num by field | where num &amp;gt; 50 AND num &amp;lt; 500
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you want to count fields that have values between 50 and 100?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | somefilter | where field &amp;gt; 50 AND field &amp;lt; 500 | stats count(field) by field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Apr 2011 20:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-help-stats-of-a-count-by-that-field-but-in-band-ranges/m-p/89966#M23085</guid>
      <dc:creator>bojanz</dc:creator>
      <dc:date>2011-04-27T20:55:58Z</dc:date>
    </item>
  </channel>
</rss>

