<?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 can I find the difference between table rows? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340860#M101080</link>
    <description>&lt;P&gt;Give this as well&lt;BR /&gt;
&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving fields half, app_name, dataconsumed
| chart values(dataconsumed) over app_name by half
| eval difference=second_half-first_half
| where difference&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Sep 2017 04:27:04 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-09-18T04:27:04Z</dc:date>
    <item>
      <title>How can I find the difference between table rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340858#M101078</link>
      <description>&lt;P&gt;I have results in following table format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;half    app_name    dataconsumed
-----------------------------------
first_half    skype    50
first_half    facebook    90
first_half    yahoo    10
first_half    bing    30
second_half    skype    150
second_half    facebook    100
second_half    yahoo    5
second_half    bing    50
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How should I find the difference in dataconsumed for ex (difference = secondhalf - firsthalf) and exclude app if difference is negative.&lt;/P&gt;

&lt;P&gt;for above table result should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;app    difference
------------------------
skype    100
facebook    10
bing    20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: In above result table yahoo is excluded since it's difference is negative.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2017 19:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340858#M101078</guid>
      <dc:creator>sohaibomar</dc:creator>
      <dc:date>2017-09-17T19:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the difference between table rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340859#M101079</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table half appname dataconsumed
| stats sum(eval(if(half="first_half",dataconsumed,null()))) as data1
   sum(eval(if(half="first_half",null(),dataconsumed))) as data2
   by appname
| eval difference=data2-data1
| where difference &amp;gt; 0 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2017 22:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340859#M101079</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-17T22:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the difference between table rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340860#M101080</link>
      <description>&lt;P&gt;Give this as well&lt;BR /&gt;
&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving fields half, app_name, dataconsumed
| chart values(dataconsumed) over app_name by half
| eval difference=second_half-first_half
| where difference&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Sep 2017 04:27:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340860#M101080</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-18T04:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the difference between table rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340861#M101081</link>
      <description>&lt;P&gt;@somesoni2  nice. but &lt;CODE&gt;difference&amp;gt;0&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 13:11:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340861#M101081</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-18T13:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the difference between table rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340862#M101082</link>
      <description>&lt;P&gt;Gosh... I can swear it was &lt;CODE&gt;&amp;gt;&lt;/CODE&gt; in my mind while typing. Thanks @Daljeanis for correcting it..&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 14:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-the-difference-between-table-rows/m-p/340862#M101082</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-18T14:29:32Z</dc:date>
    </item>
  </channel>
</rss>

