<?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: Why is my search to create a range of values not returning any results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226702#M66875</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
that worked!&lt;BR /&gt;
I just had to play with the rex a bit but that did the trick&lt;BR /&gt;
Thank u&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2016 08:46:11 GMT</pubDate>
    <dc:creator>Rotema</dc:creator>
    <dc:date>2016-03-03T08:46:11Z</dc:date>
    <item>
      <title>Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226694#M66867</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to run this search in order to range the values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prod GetClientStateNotFound | rex "AccountNumber=(?P\d+)" | chart count by AccountNumber | where count&amp;gt;=10 | convert rmunit(AccountNumber)| eval type=case(AccountNumber &amp;gt;=10 AND AccountNumber &amp;lt; 30,"Between 10 and 30 ",AccountNumber &amp;gt;= 31 AND AccountNumber &amp;lt;=50,"Between 31 and 50",AccountNumber &amp;gt;= 51 AND AccountNumber &amp;lt;=70,"Between 51 and 70", AccountNumber &amp;gt;= 71 AND AccountNumber &amp;lt;=100,"Between 71 and 100") | chart count by type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I'm getting no results &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;
Can you help me understand what's wrong here?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rotem&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 15:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226694#M66867</guid>
      <dc:creator>Rotema</dc:creator>
      <dc:date>2016-03-02T15:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226695#M66868</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Just to clear, I'm trying to range the value of "AccountNumber"&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rotem&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 15:54:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226695#M66868</guid>
      <dc:creator>Rotema</dc:creator>
      <dc:date>2016-03-02T15:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226696#M66869</link>
      <description>&lt;P&gt;Do you get results if you run your query without last chart command??&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226696#M66869</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-02T17:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226697#M66870</link>
      <description>&lt;P&gt;Hi, no results.&lt;BR /&gt;
I'm pretty sure the problem is that I'm getting the account values but what I want do is count the account numbers amount and then range them.&lt;/P&gt;

&lt;P&gt;Tnx &lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226697#M66870</guid>
      <dc:creator>Rotema</dc:creator>
      <dc:date>2016-03-02T17:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226698#M66871</link>
      <description>&lt;P&gt;Can  you provide some sample values for Account number that you have? Probably issue with converting the Account number to numeric value to range.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 00:55:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226698#M66871</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T00:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226699#M66872</link>
      <description>&lt;P&gt;Your &lt;CODE&gt;rex&lt;/CODE&gt; command is wrong: it doesn't specify a field name. So there is no "AccountNumber" field. Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prod GetClientStateNotFound 
| rex "AccountNumber=(?P&amp;lt;AccountNumber&amp;gt;\d+)" 
| chart count by AccountNumber
| where count&amp;gt;=10 
| convert rmunit(AccountNumber)
| eval type=case(AccountNumber &amp;gt;=10 AND AccountNumber &amp;lt; 30,"Between 10 and 30 ",
                              AccountNumber &amp;gt;= 31 AND AccountNumber &amp;lt;=50,"Between 31 and 50",
                              AccountNumber &amp;gt;= 51 AND AccountNumber &amp;lt;=70,"Between 51 and 70", 
                             AccountNumber &amp;gt;= 71 AND AccountNumber &amp;lt;=100,"Between 71 and 100") 
| stats sum(count) as ClientStateNotFound count as NumAccountNumbers by type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that I have also changed the final command; you probably should pick whether you want to count the number of times that "GetClientStateNotFound" occurred - or whether you want to count the number of AccountNumbers of each type.&lt;BR /&gt;
Note that the rex may still be wrong. Show us a sample of the data if you still need help.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 01:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226699#M66872</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-03T01:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226700#M66873</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thanks for the replies.&lt;BR /&gt;
here is an example of the data:&lt;BR /&gt;
Query: &lt;BR /&gt;
index=prod GetClientStateNotFound | rex "AccountNumber=(?P\d+)" | chart count by AccountNumber | where count&amp;gt;=10 &lt;/P&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;P&gt;AccountNumber   count&lt;BR /&gt;
1   2266456            52&lt;BR /&gt;
2   5214944            44&lt;BR /&gt;
3   2354071            35&lt;BR /&gt;
4   6386060            35&lt;BR /&gt;
5   6573558            35&lt;BR /&gt;
6   6296155            34&lt;BR /&gt;
7   6235968            33&lt;BR /&gt;
8   6547036           30&lt;BR /&gt;
9   1856928           29&lt;BR /&gt;
10  2629859           26&lt;/P&gt;

&lt;P&gt;What I'm trying to do is range the counts (1-30, 31-50, 51-70) &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 07:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226700#M66873</guid>
      <dc:creator>Rotema</dc:creator>
      <dc:date>2016-03-03T07:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226701#M66874</link>
      <description>&lt;P&gt;Since you wan to get range of count, not the account numbers, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prod GetClientStateNotFound | rex "AccountNumber=(?P\d+)" | chart count by AccountNumber | where count&amp;gt;=10 | eval type=case(count&amp;gt;=10 AND count&amp;lt; 30,"Between 10 and 30 ",count&amp;gt;= 31 AND count&amp;lt;=50,"Between 31 and 50",count&amp;gt;= 51 AND count&amp;lt;=70,"Between 51 and 70", count&amp;gt;= 71 AND count&amp;lt;=100,"Between 71 and 100") | chart count by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Mar 2016 07:42:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226701#M66874</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T07:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search to create a range of values not returning any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226702#M66875</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
that worked!&lt;BR /&gt;
I just had to play with the rex a bit but that did the trick&lt;BR /&gt;
Thank u&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 08:46:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-to-create-a-range-of-values-not-returning-any/m-p/226702#M66875</guid>
      <dc:creator>Rotema</dc:creator>
      <dc:date>2016-03-03T08:46:11Z</dc:date>
    </item>
  </channel>
</rss>

