<?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: Comparing information based on _time and calculated value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579630#M201970</link>
    <description>&lt;P&gt;Try this.&amp;nbsp; The streamstats command takes the difference between adjacent results then we filter for a jump of more than 10.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sandwiches saved_search_name="yum" earliest=-7d
| bin span=24h _time
| search sandwich_type="PB&amp;amp;J"
| stats count by total_bread_type _time
| stats sum(total_bread_type) as bread by _time
| eval bread = round(bread / 10000, 2)
| streamstats window=2 range(bread) as diff
| where diff &amp;gt; 10&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 30 Dec 2021 20:22:58 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-12-30T20:22:58Z</dc:date>
    <item>
      <title>Comparing information based on _time and calculated value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579624#M201967</link>
      <description>&lt;P&gt;I have looked for solutions but I have mostly found results regarding only current and past time comparison which is not what I need.&lt;BR /&gt;&lt;BR /&gt;I have a query that bins _time by 24h spans over the previous 7 days. and calculates a numeric value associated with those time spans. What I need is to compare each day's values to the entire week's and find any time period (so 48h) where the number jumped significantly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;An example of something similar to my my code:&lt;BR /&gt;&lt;BR /&gt;index=sandwiches saved_search_name="yum" earliest=-7d&lt;BR /&gt;| bin span=24h _time&lt;BR /&gt;| search sandwich_type="PB&amp;amp;J"&lt;BR /&gt;| stats count by total_bread_type _time&lt;BR /&gt;| stats sum(total_bread_type) as bread by _time&lt;BR /&gt;| eval bread = round(bread / 10000, 2)&lt;BR /&gt;&lt;BR /&gt;currently the results are like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_time&lt;/TD&gt;&lt;TD&gt;bread&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-22 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-23 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-24 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-25 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;47&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-26 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;48&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-27 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;46&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12-28 18:00&lt;/TD&gt;&lt;TD width="50%"&gt;47&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Basically I am looking to compare the 'bread' values by _time and figure out if/where there is a jump of 10 or more and return that data.&lt;BR /&gt;&lt;BR /&gt;Any insight would be appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 17:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579624#M201967</guid>
      <dc:creator>Brainstorms</dc:creator>
      <dc:date>2021-12-30T17:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing information based on _time and calculated value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579630#M201970</link>
      <description>&lt;P&gt;Try this.&amp;nbsp; The streamstats command takes the difference between adjacent results then we filter for a jump of more than 10.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sandwiches saved_search_name="yum" earliest=-7d
| bin span=24h _time
| search sandwich_type="PB&amp;amp;J"
| stats count by total_bread_type _time
| stats sum(total_bread_type) as bread by _time
| eval bread = round(bread / 10000, 2)
| streamstats window=2 range(bread) as diff
| where diff &amp;gt; 10&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Dec 2021 20:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579630#M201970</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-30T20:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing information based on _time and calculated value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579631#M201971</link>
      <description>&lt;P&gt;That did the trick! Thank you so much Rich.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 20:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-information-based-on-time-and-calculated-value/m-p/579631#M201971</guid>
      <dc:creator>Brainstorms</dc:creator>
      <dc:date>2021-12-30T20:26:12Z</dc:date>
    </item>
  </channel>
</rss>

