<?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: Calculate Percentage Difference Between Two Searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97847#M25248</link>
    <description>&lt;P&gt;Could you please give the below query a try:&lt;/P&gt;

&lt;P&gt;|bucket _time span=5m| eval percent_difference=((BandwidthIn/BandwidthOut)*100) | table percent_difference ,_time&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:22:08 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2020-09-28T14:22:08Z</dc:date>
    <item>
      <title>Calculate Percentage Difference Between Two Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97846#M25247</link>
      <description>&lt;P&gt;When running a single search on bandwidth data I can calculate the percentage between bandwidth In and Out using this eval fucntion:&lt;/P&gt;

&lt;P&gt;| eval percent_difference=((BandwidthIn/BandwidthOut)*100) | table percent_difference _time&lt;/P&gt;

&lt;P&gt;What I want to do is calculate the percentage change between bandwidth over a 5/minute time span. For example, lets assume I'm seeing 100/mbps of bandwidth at 12:00p Noon and at 12:05p the bandwidth jumps to 125/mbps. How can I calculate the 25% increase in bandwidth between those two timespans/searches?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97846#M25247</guid>
      <dc:creator>albyva</dc:creator>
      <dc:date>2020-09-28T14:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Percentage Difference Between Two Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97847#M25248</link>
      <description>&lt;P&gt;Could you please give the below query a try:&lt;/P&gt;

&lt;P&gt;|bucket _time span=5m| eval percent_difference=((BandwidthIn/BandwidthOut)*100) | table percent_difference ,_time&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97847#M25248</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Percentage Difference Between Two Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97848#M25249</link>
      <description>&lt;P&gt;Like &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/142467"&gt;@linu1988&lt;/a&gt; points out, you can use the bucket command to get the values for every 5 mins, then you can use the delta command to calculate the difference between two adjacent events.&lt;/P&gt;

&lt;P&gt;Your search would look like:&lt;BR /&gt;
&lt;BASE_SEARCH&gt; | bucket _time span=5m| eval percent_difference=((BandwidthIn/BandwidthOut)*100) | delta percent_difference as delta_percent | table _time, percent_difference, delta_percent&lt;/BASE_SEARCH&gt;&lt;/P&gt;

&lt;P&gt;Here's the documentation on delta: &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/Delta" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/Delta&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:22:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97848#M25249</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2020-09-28T14:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Percentage Difference Between Two Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97849#M25250</link>
      <description>&lt;P&gt;Wonderful. Thanks for the | bucket  command tip.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 16:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Percentage-Difference-Between-Two-Searches/m-p/97849#M25250</guid>
      <dc:creator>albyva</dc:creator>
      <dc:date>2013-07-17T16:25:17Z</dc:date>
    </item>
  </channel>
</rss>

