<?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 subtraction doesn't work for multiple values in one field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264855#M79535</link>
    <description>&lt;P&gt;I managed to create a table that somewhat looks like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/874i03BBA04AE363242E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;However, when I tried to append a new column with the differences between after and before as its value, it just gave me a blank space. I used &lt;CODE&gt;eval differences=after-before&lt;/CODE&gt; which apparently doesn't work. Is there some other workaround on this? I need to get the list of differences so the end result should look something like below:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/875i6FAAA7893B641610/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I need to have that column so I can process the average, min, and max difference for each name1, name2, etc.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 04 Dec 2015 21:44:50 GMT</pubDate>
    <dc:creator>almond14</dc:creator>
    <dc:date>2015-12-04T21:44:50Z</dc:date>
    <item>
      <title>subtraction doesn't work for multiple values in one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264855#M79535</link>
      <description>&lt;P&gt;I managed to create a table that somewhat looks like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/874i03BBA04AE363242E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;However, when I tried to append a new column with the differences between after and before as its value, it just gave me a blank space. I used &lt;CODE&gt;eval differences=after-before&lt;/CODE&gt; which apparently doesn't work. Is there some other workaround on this? I need to get the list of differences so the end result should look something like below:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/875i6FAAA7893B641610/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I need to have that column so I can process the average, min, and max difference for each name1, name2, etc.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2015 21:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264855#M79535</guid>
      <dc:creator>almond14</dc:creator>
      <dc:date>2015-12-04T21:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: subtraction doesn't work for multiple values in one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264856#M79536</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | eval z=mvzip(before, after, "@") | mvexpand z | rex field=z "(?&amp;lt;before&amp;gt;.*)@(?&amp;lt;after&amp;gt;.*)" | table names, before, after | eval diff=after-before
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Dec 2015 22:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264856#M79536</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-04T22:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: subtraction doesn't work for multiple values in one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264857#M79537</link>
      <description>&lt;P&gt;See answer by @sundareshr but also tack on this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats list(before) AS before list(after) AS after list(diff) AS diff BY names
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Dec 2015 20:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subtraction-doesn-t-work-for-multiple-values-in-one-field/m-p/264857#M79537</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-05T20:25:31Z</dc:date>
    </item>
  </channel>
</rss>

