<?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: help on where command which returns wrong results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384783#M170399</link>
    <description>&lt;P&gt;Yes this field is a numeric field with a point before the decimal and not a comma&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2019 06:34:20 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2019-07-12T06:34:20Z</dc:date>
    <item>
      <title>help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384781#M170397</link>
      <description>&lt;P&gt;hello&lt;/P&gt;

&lt;P&gt;I have an issue with the the tonumber command &lt;BR /&gt;
When I execute the query below and even if I specify that I want &lt;CODE&gt;(HealthState00 &amp;lt; "85.00")&lt;/CODE&gt; I have results &amp;lt;"85.00" and also results &amp;gt;"85.00"&lt;BR /&gt;
So I use the tonnumber command below but it doesnt works....&lt;BR /&gt;
I use the workaround &lt;CODE&gt;AND NOT HealthState00 = "100.00" AND NOT HealthState00 = "125.01" AND NOT HealthState00 = "100.12")&lt;/CODE&gt; for displaying the good datas&lt;BR /&gt;
Could you please tell me why the tonnumber command doesnt works??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup tablet_host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT HealthState00 
| where (HealthState00 &amp;lt; "85.00")
| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| search SITE=$tok_filtersite|s$  
| stats values(SITE) as SITE values(HealthState00) as HealthState by host 
| sort +HealthState limit=10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jul 2019 12:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384781#M170397</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-11T12:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384782#M170398</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Whether &lt;CODE&gt;HealthState00&lt;/CODE&gt; is a numeric field?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 06:05:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384782#M170398</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-12T06:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384783#M170399</link>
      <description>&lt;P&gt;Yes this field is a numeric field with a point before the decimal and not a comma&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 06:34:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384783#M170399</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-12T06:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384784#M170400</link>
      <description>&lt;P&gt;What if you do &lt;CODE&gt;where HealthState &amp;lt; 85&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 07:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384784#M170400</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T07:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384785#M170401</link>
      <description>&lt;P&gt;I have no results...&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 09:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384785#M170401</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-12T09:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384786#M170402</link>
      <description>&lt;P&gt;Then your healthstate field is not a number. Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup tablet_host.csv 
 | lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT HealthState00 
 | eval HealthState00=tonumber(HealthState00)
 | where HealthState00 &amp;lt; 85
 | lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
 | search SITE=$tok_filtersite|s$  
 | stats values(SITE) as SITE values(HealthState00) as HealthState by host 
 | sort +HealthState limit=10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 09:21:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384786#M170402</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T09:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384787#M170403</link>
      <description>&lt;P&gt;always no results franck&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 09:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384787#M170403</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-12T09:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384788#M170404</link>
      <description>&lt;P&gt;What does this show (can you perhaps share a screenshot of that):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup tablet_host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT HealthState00 
| eval HealthState00_number=tonumber(HealthState00)
| table host HealthState00 HealthState00_number
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 09:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384788#M170404</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T09:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384789#M170405</link>
      <description>&lt;P&gt;Here is the screenshot&lt;BR /&gt;
&lt;A href="https://www.cjoint.com/c/IGmkmAV0zHc"&gt;https://www.cjoint.com/c/IGmkmAV0zHc&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 10:12:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384789#M170405</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-12T10:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384790#M170406</link>
      <description>&lt;P&gt;I clearly see &lt;CODE&gt;,&lt;/CODE&gt; there in &lt;CODE&gt;HealthState00&lt;/CODE&gt; and the fact that it is left-aligned in that column indicates it is not a numeric value. Due to the &lt;CODE&gt;,&lt;/CODE&gt; the tonumber also fails. Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | inputlookup tablet_host.csv 
  | lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT HealthState00 
  | eval HealthState00=tonumber(replace(HealthState00,",","."))
  | where HealthState00 &amp;lt; 85
  | lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
  | search SITE=$tok_filtersite|s$  
  | stats values(SITE) as SITE values(HealthState00) as HealthState by host 
  | sort +HealthState limit=10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 10:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384790#M170406</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T10:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384791#M170407</link>
      <description>&lt;P&gt;Yes it works franck &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 11:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384791#M170407</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-12T11:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: help on where command which returns wrong results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384792#M170408</link>
      <description>&lt;P&gt;Nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've converted my comment to an answer.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 12:07:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-command-which-returns-wrong-results/m-p/384792#M170408</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-12T12:07:47Z</dc:date>
    </item>
  </channel>
</rss>

