<?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 2 spunk search into one result and substract the sum value of 1 search to another search and display it? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450558#M127577</link>
    <description>&lt;P&gt;one with ! in it...in the transaction command...&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2018 11:29:20 GMT</pubDate>
    <dc:creator>archonixm</dc:creator>
    <dc:date>2018-10-31T11:29:20Z</dc:date>
    <item>
      <title>How to 2 spunk search into one result and substract the sum value of 1 search to another search and display it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450556#M127575</link>
      <description>&lt;P&gt;index=oswindows sourcetype="winhost" host=&lt;EM&gt;npe&lt;/EM&gt; OR host=&lt;EM&gt;npw&lt;/EM&gt; source=service earliest="-30d@d" latest="@d DisplayName="Vontu Monitor" &lt;BR /&gt;
| transaction DisplayName !(startswith="State=Stopped" endswith="State=Running") &lt;BR /&gt;
| stats sum(duration) as abc1 by host,DisplayName &lt;/P&gt;

&lt;P&gt;index=oswindows sourcetype="winhost" host=&lt;EM&gt;npe&lt;/EM&gt; OR host=&lt;EM&gt;npw&lt;/EM&gt; source=service earliest="-30d@d" latest="@d" DisplayName="Vontu Monitor" &lt;BR /&gt;
| transaction DisplayName startswith="State=Stopped" endswith="State=Running" &lt;BR /&gt;
| stats sum(duration) as abc2 by host, DisplayName &lt;/P&gt;

&lt;P&gt;What I want is to substract the first sum of value by host for first search with second search. Please help me. I tried append and appendcols but it doesn't display the second search result.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:17:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450556#M127575</guid>
      <dc:creator>archonixm</dc:creator>
      <dc:date>2018-10-31T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to 2 spunk search into one result and substract the sum value of 1 search to another search and display it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450557#M127576</link>
      <description>&lt;P&gt;The two searches are identical except for the &lt;CODE&gt;as&lt;/CODE&gt; clause so the result will always be zero.&lt;BR /&gt;
Perhaps you meant to paste a different second search?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450557#M127576</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-10-31T11:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to 2 spunk search into one result and substract the sum value of 1 search to another search and display it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450558#M127577</link>
      <description>&lt;P&gt;one with ! in it...in the transaction command...&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:29:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450558#M127577</guid>
      <dc:creator>archonixm</dc:creator>
      <dc:date>2018-10-31T11:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to 2 spunk search into one result and substract the sum value of 1 search to another search and display it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450559#M127578</link>
      <description>&lt;P&gt;This is a simple example, but give something like this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined action=addtocart 
| stats sum(bytes) as bytes_atc by clientip 
| appendcols 
    [ search sourcetype=access_combined action=purchase 
    | stats sum(bytes) as bytes_purch by clientip] 
| eval sum_all=bytes_atc + bytes_purch
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Oct 2018 13:22:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-2-spunk-search-into-one-result-and-substract-the-sum/m-p/450559#M127578</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2018-10-31T13:22:11Z</dc:date>
    </item>
  </channel>
</rss>

