<?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 add a field being a sum of previous rows? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207278#M187746</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;i am looking to solve following problem. &lt;BR /&gt;
How to calculate the fields summary_worked and summary_requested?&lt;/P&gt;

&lt;P&gt;month &lt;STRONG&gt;hours_worked&lt;/STRONG&gt; summary_worked                                     &lt;STRONG&gt;hours_requested&lt;/STRONG&gt;   summary_requested&lt;BR /&gt;
&lt;EM&gt;april&lt;/EM&gt;    160                    160 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april&lt;/EM&gt;)                   160                        160 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april&lt;/EM&gt;)&lt;BR /&gt;
&lt;EM&gt;may&lt;/EM&gt;    160                    320 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april+may&lt;/EM&gt;)          128                        288 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april+may&lt;/EM&gt;)&lt;BR /&gt;
&lt;EM&gt;june&lt;/EM&gt;    160                    480 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april+may+june&lt;/EM&gt;) 188                        476 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april+may+june&lt;/EM&gt;)&lt;/P&gt;

&lt;P&gt;Cheers&lt;BR /&gt;
Tomasz&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:56:36 GMT</pubDate>
    <dc:creator>tomaszwrona</dc:creator>
    <dc:date>2020-09-29T09:56:36Z</dc:date>
    <item>
      <title>How to add a field being a sum of previous rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207278#M187746</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;i am looking to solve following problem. &lt;BR /&gt;
How to calculate the fields summary_worked and summary_requested?&lt;/P&gt;

&lt;P&gt;month &lt;STRONG&gt;hours_worked&lt;/STRONG&gt; summary_worked                                     &lt;STRONG&gt;hours_requested&lt;/STRONG&gt;   summary_requested&lt;BR /&gt;
&lt;EM&gt;april&lt;/EM&gt;    160                    160 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april&lt;/EM&gt;)                   160                        160 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april&lt;/EM&gt;)&lt;BR /&gt;
&lt;EM&gt;may&lt;/EM&gt;    160                    320 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april+may&lt;/EM&gt;)          128                        288 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april+may&lt;/EM&gt;)&lt;BR /&gt;
&lt;EM&gt;june&lt;/EM&gt;    160                    480 (&lt;STRONG&gt;hours worked&lt;/STRONG&gt; for &lt;EM&gt;april+may+june&lt;/EM&gt;) 188                        476 (&lt;STRONG&gt;hours_requested&lt;/STRONG&gt; for &lt;EM&gt;april+may+june&lt;/EM&gt;)&lt;/P&gt;

&lt;P&gt;Cheers&lt;BR /&gt;
Tomasz&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207278#M187746</guid>
      <dc:creator>tomaszwrona</dc:creator>
      <dc:date>2020-09-29T09:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a field being a sum of previous rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207279#M187747</link>
      <description>&lt;P&gt;It sounds like you want a running total.  You can do this with the splunk command &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Accum"&gt;accum&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;You don't give any of your search, so I can only make a complete and total guess as to the search command you'll use, but it could be...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... your base search ... | accum hours_worked AS hours_worked_total | accum hours_requested AS hours_requested_total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Give that a try and see what it gets you.  If you need more specific help, but sure to paste in your search and perhaps a few actual events (if the above aren't actual events).&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 11:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207279#M187747</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-06-13T11:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a field being a sum of previous rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207280#M187748</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;this is exactly what i wanted to achieve - thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 11:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-field-being-a-sum-of-previous-rows/m-p/207280#M187748</guid>
      <dc:creator>tomaszwrona</dc:creator>
      <dc:date>2016-06-13T11:59:53Z</dc:date>
    </item>
  </channel>
</rss>

