<?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 can I find values within a specific range/ make sure each value meets the criteria of a particular range? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307486#M92251</link>
    <description>&lt;P&gt;Not entirely sure I understand what you're trying to ask.  The values command is just going to list the value that is already attached to that record.  Are you wanting to not include a record that falls outside of that range?  If that is the case, I would include that as part of your original search before it feeds into your stats function.&lt;/P&gt;

&lt;P&gt;Your option is if you just want to change a value that falls outside of that range to something that does is again, before the stats function do an eval...&lt;/P&gt;

&lt;P&gt;| eval Change = if(change &amp;lt; 0.001, 0.001, if (change &amp;gt; 0.1, 0.1, change))&lt;/P&gt;</description>
    <pubDate>Sat, 14 Oct 2017 03:10:06 GMT</pubDate>
    <dc:creator>troyward</dc:creator>
    <dc:date>2017-10-14T03:10:06Z</dc:date>
    <item>
      <title>How can I find values within a specific range/ make sure each value meets the criteria of a particular range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307485#M92250</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;We have the following search: &lt;BR /&gt;
index="blah" &lt;BR /&gt;
| stats values(Change), values(Volume), values(Price) by Symbol&lt;/P&gt;

&lt;P&gt;Some results are too large or too small of a number range, so I want to fine tune the range.  &lt;/P&gt;

&lt;P&gt;How do I do this?  &lt;/P&gt;

&lt;P&gt;| stats values (Change){range=0.001:0.100}&lt;BR /&gt;
???&lt;/P&gt;

&lt;P&gt;How do I make sure each value meets the criteria of a particular range?  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307485#M92250</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2017-10-14T02:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find values within a specific range/ make sure each value meets the criteria of a particular range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307486#M92251</link>
      <description>&lt;P&gt;Not entirely sure I understand what you're trying to ask.  The values command is just going to list the value that is already attached to that record.  Are you wanting to not include a record that falls outside of that range?  If that is the case, I would include that as part of your original search before it feeds into your stats function.&lt;/P&gt;

&lt;P&gt;Your option is if you just want to change a value that falls outside of that range to something that does is again, before the stats function do an eval...&lt;/P&gt;

&lt;P&gt;| eval Change = if(change &amp;lt; 0.001, 0.001, if (change &amp;gt; 0.1, 0.1, change))&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 03:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307486#M92251</guid>
      <dc:creator>troyward</dc:creator>
      <dc:date>2017-10-14T03:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find values within a specific range/ make sure each value meets the criteria of a particular range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307487#M92252</link>
      <description>&lt;P&gt;Hi troyward, &lt;/P&gt;

&lt;P&gt;Thanks for your reply.  Yes, that is correct.&lt;BR /&gt;&lt;BR /&gt;
| eval Change = if(change &amp;lt; 0.001, 0.001, if (change &amp;gt; 0.1, 0.1, change))&lt;BR /&gt;
works perfect for the "Change" field.  &lt;/P&gt;

&lt;P&gt;I need it to apply to 3 total fields.  If one doesn't match, then result should not show.  &lt;/P&gt;

&lt;P&gt;How do I do an eval on 3 different fields?  &lt;/P&gt;

&lt;P&gt;Perhaps...&lt;BR /&gt;
| eval Change = if(change &amp;lt; 0.001, 0.001, if (change &amp;gt; 0.1, 0.1, change)), Volume = if(Volume &amp;lt; 0.002, 0.002, if (Volume &amp;gt; 1.0, 1.0, Volume)), Price = if(Price &amp;lt; 1.0, 1.0, if (Price &amp;gt; 0.001, 0.001, Price))&lt;/P&gt;

&lt;P&gt;Or can you not simply comma separate the different fields for eval?  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 04:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-values-within-a-specific-range-make-sure-each/m-p/307487#M92252</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2017-10-14T04:50:07Z</dc:date>
    </item>
  </channel>
</rss>

