<?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 to control values of a field relative to the values in the _time field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174877#M50179</link>
    <description>&lt;P&gt;thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2015 01:39:24 GMT</pubDate>
    <dc:creator>HattrickNZ</dc:creator>
    <dc:date>2015-05-08T01:39:24Z</dc:date>
    <item>
      <title>How to control values of a field relative to the values in the _time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174875#M50177</link>
      <description>&lt;P&gt;I have this search, and this at least gives me some output but not as I would like. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal sourcetype="splunk_web_access" | timechart count(uri) | eval test=if(_time&amp;amp;lt;="2015-04-29",450,600)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But what I want to do is be able to control the value of the &lt;CODE&gt;test&lt;/CODE&gt; field relative to the &lt;CODE&gt;_time&lt;/CODE&gt; field. &lt;BR /&gt;
For instance, I would like &lt;CODE&gt;test&lt;/CODE&gt; to be equal to 450 up to this date "2015-04-29" and then 600 afer that.&lt;BR /&gt;
What is the corerct syntax to do this? &lt;/P&gt;

&lt;P&gt;The output of my data looks something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time   count(uri)  test
2015-04-08  1   450
2015-04-09  1   450
2015-04-10  1   450
2015-04-11  0   450
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 May 2015 00:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174875#M50177</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-05-08T00:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to control values of a field relative to the values in the _time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174876#M50178</link>
      <description>&lt;P&gt;_time is actually a timestamp and not the %Y-%m-%d representation so if you  do an &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval tcheck=strptime("2015-04-29","%F") | eval test=if(_time&amp;amp;lt;=tcheck,450,600)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and that should work&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 00:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174876#M50178</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-05-08T00:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to control values of a field relative to the values in the _time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174877#M50179</link>
      <description>&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 01:39:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-values-of-a-field-relative-to-the-values-in-the/m-p/174877#M50179</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-05-08T01:39:24Z</dc:date>
    </item>
  </channel>
</rss>

