<?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 how to get the hourly increase or decrease of a numeric field (hour 1: 10, hour 2: 20 --&amp;gt; increase = 10) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302307#M90970</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i have hourly values and i want to see the difference to the hour before.&lt;BR /&gt;
So instead of hour 1: 10€, hour 2: 20€, hour 3: 10€&lt;BR /&gt;
I want the increase / decrease: hour 2: +10 hour 3: -10&lt;/P&gt;

&lt;P&gt;I imagined this should be possible with a calculated field maybe?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 18:28:43 GMT</pubDate>
    <dc:creator>jschikar</dc:creator>
    <dc:date>2017-02-16T18:28:43Z</dc:date>
    <item>
      <title>how to get the hourly increase or decrease of a numeric field (hour 1: 10, hour 2: 20 --&gt; increase = 10)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302307#M90970</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i have hourly values and i want to see the difference to the hour before.&lt;BR /&gt;
So instead of hour 1: 10€, hour 2: 20€, hour 3: 10€&lt;BR /&gt;
I want the increase / decrease: hour 2: +10 hour 3: -10&lt;/P&gt;

&lt;P&gt;I imagined this should be possible with a calculated field maybe?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 18:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302307#M90970</guid>
      <dc:creator>jschikar</dc:creator>
      <dc:date>2017-02-16T18:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the hourly increase or decrease of a numeric field (hour 1: 10, hour 2: 20 --&gt; increase = 10)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302308#M90971</link>
      <description>&lt;P&gt;This generates some test data -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval myfield="10 20 15 30 18 40" | makemv myfield | mvexpand myfield 
| streamstats count as hour | eval _time = _time + 3600*hour | bin _time span=1h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what you want -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| delta myfield as difference
| table _time hour myfield difference
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With this sample output -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                         hour      myfield   difference
2017-02-16T20:00:00.000+0000  1         10                  
2017-02-16T21:00:00.000+0000  2         20        10        
2017-02-16T22:00:00.000+0000  3         15        -5        
2017-02-16T23:00:00.000+0000  4         30        15        
2017-02-17T00:00:00.000+0000  5         18        -12       
2017-02-17T01:00:00.000+0000  6         40        22    
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2017 19:00:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302308#M90971</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-16T19:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the hourly increase or decrease of a numeric field (hour 1: 10, hour 2: 20 --&gt; increase = 10)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302309#M90972</link>
      <description>&lt;P&gt;That's exactly what i want!&lt;BR /&gt;
Thanks very much, I didn't come across the delta function &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 19:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302309#M90972</guid>
      <dc:creator>jschikar</dc:creator>
      <dc:date>2017-02-16T19:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the hourly increase or decrease of a numeric field (hour 1: 10, hour 2: 20 --&gt; increase = 10)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302310#M90973</link>
      <description>&lt;P&gt;No problem.  There's a lot of splunk verbs I don't know yet.  Every week I learn another one or two, or a better way to use the ones I DO know...&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 21:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-hourly-increase-or-decrease-of-a-numeric-field/m-p/302310#M90973</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-16T21:29:31Z</dc:date>
    </item>
  </channel>
</rss>

