<?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: Using Eval where in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30473#M6179</link>
    <description>&lt;P&gt;Test to see if succeeded_count and task count are actually numbers. Other than that, I cannot see why this would not work&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2013 13:41:54 GMT</pubDate>
    <dc:creator>davecroto</dc:creator>
    <dc:date>2013-08-09T13:41:54Z</dc:date>
    <item>
      <title>Using Eval where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30471#M6177</link>
      <description>&lt;P&gt;I'm doing something wrong here.. . I have the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval SuccessRatio =  (round(((succeeded_count)/(task_count)) * 100)). "%" | search SuccessRatio &amp;lt; 98 |  sort SuccessRatio
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to filter out anything that has a SuccessRatio of greater than 98% but its not working I'm still getting results that have 100% success.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 13:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30471#M6177</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2013-08-09T13:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30472#M6178</link>
      <description>&lt;P&gt;*|eval succeeded_count=99 |eval task_count=1| eval SuccessRatio =  (round(((succeeded_count)/(task_count)) * 100)). "%" | search SuccessRatio &amp;lt; 98 |  sort SuccessRatio&lt;/P&gt;

&lt;P&gt;vs&lt;/P&gt;

&lt;P&gt;*|eval succeeded_count=20 |eval task_count=1| eval SuccessRatio =  (round(((succeeded_count)/(task_count)) * 100)). "%" | search SuccessRatio &amp;lt; 98 |  sort SuccessRatio&lt;/P&gt;

&lt;P&gt;Seems to work for the above&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:32:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30472#M6178</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2020-09-28T14:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30473#M6179</link>
      <description>&lt;P&gt;Test to see if succeeded_count and task count are actually numbers. Other than that, I cannot see why this would not work&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 13:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30473#M6179</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2013-08-09T13:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30474#M6180</link>
      <description>&lt;P&gt;Did you ever get this to work?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 15:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30474#M6180</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2013-08-09T15:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30475#M6181</link>
      <description>&lt;P&gt;because you appended "%" to the number before filtering, making it a string (not a number). SuccessRatio is not a number, it's a string. eval, filter, sort, and &lt;EM&gt;then&lt;/EM&gt; format it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ... | eval SuccessRatio = round(100*succeeded_count/task_count) | where SuccessRatio &amp;lt; 98 | sort SuccessRatio | eval SuccessRatio = SuccessRatio . "%"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Aug 2013 00:04:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-where/m-p/30475#M6181</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-08-10T00:04:41Z</dc:date>
    </item>
  </channel>
</rss>

