<?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: operations on field values within multiple rows of the same source in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198988#M57600</link>
    <description>&lt;P&gt;I see. Is it certain that these three events have the exact same timestamp and there is only one set of three for each timestamp?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jun 2014 18:15:25 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-06-16T18:15:25Z</dc:date>
    <item>
      <title>operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198985#M57597</link>
      <description>&lt;P&gt;I have one source and I need to use the field values from multiple rows to come up with an average. I have the data already indexed by _time. The data is like this.&lt;/P&gt;

&lt;P&gt;1:00:00 field1=value1 field2=value2 &lt;BR /&gt;
1:00:00 field1=value3 field2=value4&lt;BR /&gt;
1:00:00 field1=value5 field2=value6&lt;/P&gt;

&lt;P&gt;this repeats every 30 seconds. I need to calculate as follows for every 30 second span&lt;/P&gt;

&lt;P&gt;(value2 + value4)/value6&lt;/P&gt;

&lt;P&gt;I have tried using append, but I can't figure out how to use the renamed values of "field2" to perform the operation I need to do and then visualize the data. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 17:48:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198985#M57597</guid>
      <dc:creator>trailhead26</dc:creator>
      <dc:date>2014-06-16T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198986#M57598</link>
      <description>&lt;P&gt;How do you identify the three different rows and their meaning?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 18:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198986#M57598</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-16T18:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198987#M57599</link>
      <description>&lt;P&gt;by the values of field1&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 18:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198987#M57599</guid>
      <dc:creator>trailhead26</dc:creator>
      <dc:date>2014-06-16T18:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198988#M57600</link>
      <description>&lt;P&gt;I see. Is it certain that these three events have the exact same timestamp and there is only one set of three for each timestamp?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 18:15:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198988#M57600</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-16T18:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198989#M57601</link>
      <description>&lt;P&gt;that is correct&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 18:16:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198989#M57601</guid>
      <dc:creator>trailhead26</dc:creator>
      <dc:date>2014-06-16T18:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198990#M57602</link>
      <description>&lt;P&gt;Okay, based on the assumptions in the comments you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar | eval value2 = case(field1=value1, field2) | eval value4 = case(field1=value3, field2) | eval value6 = case(field1=value5, field2) | stats values(value*) as value* by _time | eval result = (value2 + value4) / value6 | timechart span=30s avg(result)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jun 2014 18:45:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198990#M57602</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-16T18:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198991#M57603</link>
      <description>&lt;P&gt;Thanks!&lt;BR /&gt;
I don't think anything is being calculated in result. Is there a way to test that part?&lt;BR /&gt;
My result always comes up blank&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 19:36:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198991#M57603</guid>
      <dc:creator>trailhead26</dc:creator>
      <dc:date>2014-06-16T19:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198992#M57604</link>
      <description>&lt;P&gt;You can leave off the final &lt;CODE&gt;timechart&lt;/CODE&gt; and see if the intermediate values are calculated correctly.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198992#M57604</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-16T20:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: operations on field values within multiple rows of the same source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198993#M57605</link>
      <description>&lt;P&gt;never mind, typo. I got it now. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:56:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/operations-on-field-values-within-multiple-rows-of-the-same/m-p/198993#M57605</guid>
      <dc:creator>trailhead26</dc:creator>
      <dc:date>2014-06-16T20:56:51Z</dc:date>
    </item>
  </channel>
</rss>

