<?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: Need help with cumulative sum in the  back end in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057557#M86855</link>
    <description>&lt;LI-CODE lang="markup"&gt;tab1:
LOAD *,
     RangeSum(SalesUnits+[Inv units]-Avgqty,Peek(CumulativeSum)) as CumulativeSum
INLINE [
    Week, SalesUnits, Inv units, Avgqty
    202301, 100, 500, 300
    202302, 500, 0, 300
    202303, 600, 0, 300
    202304, 700, 0, 300
    202305, 900, 0, 300
];&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 05 Apr 2023 15:29:38 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2023-04-05T15:29:38Z</dc:date>
    <item>
      <title>Need help with cumulative sum in the  back end</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057534#M86853</link>
      <description>&lt;P&gt;Hi Everyone ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am trying to get a cumulative sum&amp;nbsp; of a table with multiple columns . I was able to achieve this&amp;nbsp; in front end easily&amp;nbsp; using this expression RANGESUM (above(total((([&amp;nbsp; Sales Units] +[Inventory Units])-([Avg Qty]))),0,RowNo(TOTAL)) . But when i am trying to replicate the same thing in script&amp;nbsp; &amp;nbsp;i am not able to do it . Any help would be greatly Appreciated.&lt;/P&gt;
&lt;P&gt;Sample Data :&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;tab1:&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt; * INLINE [&lt;BR /&gt;&amp;nbsp; Week, &amp;nbsp;SalesUnits, Inv units,Avgqty,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 202301, 100, 500, 300&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 202302, 500, 0,300&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 202303, 600, 0,300&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 202304, 700, 0,300&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 202305, 900, 0,300&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;];&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected output&amp;nbsp;&lt;/P&gt;
&lt;P&gt;week, Cumulative sum&lt;/P&gt;
&lt;P&gt;202301, 300&lt;/P&gt;
&lt;P&gt;2020302, 500&lt;/P&gt;
&lt;P&gt;2020303,800,&lt;/P&gt;
&lt;P&gt;2020304,1200&lt;/P&gt;
&lt;P&gt;2020305, 1800&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 14:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057534#M86853</guid>
      <dc:creator>Dave1</dc:creator>
      <dc:date>2023-04-05T14:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cumulative sum in the  back end</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057557#M86855</link>
      <description>&lt;LI-CODE lang="markup"&gt;tab1:
LOAD *,
     RangeSum(SalesUnits+[Inv units]-Avgqty,Peek(CumulativeSum)) as CumulativeSum
INLINE [
    Week, SalesUnits, Inv units, Avgqty
    202301, 100, 500, 300
    202302, 500, 0, 300
    202303, 600, 0, 300
    202304, 700, 0, 300
    202305, 900, 0, 300
];&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 15:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057557#M86855</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2023-04-05T15:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cumulative sum in the  back end</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057594#M86857</link>
      <description>&lt;P&gt;It is calculating but getting duplicates for week&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 16:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-cumulative-sum-in-the-back-end/m-p/2057594#M86857</guid>
      <dc:creator>Dave1</dc:creator>
      <dc:date>2023-04-05T16:43:00Z</dc:date>
    </item>
  </channel>
</rss>

