<?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: Transaction substitution of multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179509#M51678</link>
    <description>&lt;P&gt;I would try using &lt;CODE&gt;mvlist=Value1&lt;/CODE&gt; inside your &lt;CODE&gt;transaction&lt;/CODE&gt; declaration and then &lt;CODE&gt;eval&lt;/CODE&gt;ing the value you're looking for.  Something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test" 
| transaction ID startswith="start" endswith="end" mvlist=Value1 
| eval firstValue1=mvindex(Value1,0) 
| eval secondValue1=mvindex(Value1,1) 
| eval value1Diff=firstValue1 - secondValue1  
| table ID Timestamp value1Diff trigger duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Nov 2014 18:33:10 GMT</pubDate>
    <dc:creator>wpreston</dc:creator>
    <dc:date>2014-11-04T18:33:10Z</dc:date>
    <item>
      <title>Transaction substitution of multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179506#M51675</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to use transaction to calculate the difference between multiple fields.&lt;BR /&gt;
with this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test" | transaction ID startswith="start" endswith="end" | table ID Timestamp Value1 trigger duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i get..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ID                 Timestamp            Value1        trigger            duration
123              04.11.14 15:00         44               start                60.00
                 04.11.14 15:01          30               end        
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what i need is the difference of Value1 and the duration like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ID                 Timestamp            Value1        trigger            duration
123               04.11.14 15:00        14                                      60.00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anyone know how to subtract two Values in a Transaction?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 12:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179506#M51675</guid>
      <dc:creator>joza89</dc:creator>
      <dc:date>2014-11-04T12:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction substitution of multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179507#M51676</link>
      <description>&lt;P&gt;Have you looked at addtotals or addcoltotals? I'm not 100% sure how they react inside of a transaction though. It might work for the duration, but for Value1 it looks like you'd really need a subtractcoltotals which doesn't exist.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 13:27:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179507#M51676</guid>
      <dc:creator>jeremiahc4</dc:creator>
      <dc:date>2014-11-04T13:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction substitution of multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179508#M51677</link>
      <description>&lt;P&gt;Did not work, unfortunately.&lt;BR /&gt;
i also tried eventstats sum(Value1) as sum value this gives me the sum of all Value1s and not only in that transaction.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 13:46:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179508#M51677</guid>
      <dc:creator>joza89</dc:creator>
      <dc:date>2014-11-04T13:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction substitution of multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179509#M51678</link>
      <description>&lt;P&gt;I would try using &lt;CODE&gt;mvlist=Value1&lt;/CODE&gt; inside your &lt;CODE&gt;transaction&lt;/CODE&gt; declaration and then &lt;CODE&gt;eval&lt;/CODE&gt;ing the value you're looking for.  Something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test" 
| transaction ID startswith="start" endswith="end" mvlist=Value1 
| eval firstValue1=mvindex(Value1,0) 
| eval secondValue1=mvindex(Value1,1) 
| eval value1Diff=firstValue1 - secondValue1  
| table ID Timestamp value1Diff trigger duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Nov 2014 18:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179509#M51678</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2014-11-04T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction substitution of multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179510#M51679</link>
      <description>&lt;P&gt;Worked, Thank you for your help&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 09:28:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-substitution-of-multiple-fields/m-p/179510#M51679</guid>
      <dc:creator>joza89</dc:creator>
      <dc:date>2014-11-05T09:28:01Z</dc:date>
    </item>
  </channel>
</rss>

