<?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 Accumulative sum and group in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1911844#M75162</link>
    <description>&lt;P&gt;Hi everyone , I need to Accumulative sum , but this accumulation should be grouped by date (in my situation by month). I have script as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result:NoConcatenate Load * InLine [SumVal];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BOX:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;load distinct Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM') as DATE_REPORT&lt;BR /&gt;resident TRN_last&lt;BR /&gt;where DRCR_IND='D'&lt;BR /&gt;;&lt;BR /&gt;LET vNum=0;&lt;BR /&gt;LET NumRows=NoOfRows('BOX');&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(NumRows)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;LET vBox=Peek('DATE_REPORT',$(i));&lt;BR /&gt;LET vNum=vNum+1;&lt;BR /&gt;trace '$(vBox)';&lt;BR /&gt;trace '$(vBox)';&lt;BR /&gt;tmp1:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;load Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM') as DATE_REPORT, COMP_CUST_NO as comp_no,COMP_CUST_NAME as comp_name&lt;BR /&gt;, sum(LCY_AMOUNT) as SumVal &lt;BR /&gt;resident TRN_last&lt;BR /&gt;where DRCR_IND='D' and Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM')='$(vBox)'&lt;BR /&gt;group by Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM'), COMP_CUST_NO,COMP_CUST_NAME ;&lt;/P&gt;
&lt;P&gt;Concatenate(result)&lt;BR /&gt;load DATE_REPORT,comp_no,comp_name,SumVal,&lt;BR /&gt;rangesum(SumVal,peek('AccSumVal')) as AccSumVal, //result field&lt;BR /&gt;RowNo() as row_no,&lt;BR /&gt;AutoNumber(RowNo(),DATE_REPORT) as auto_num&lt;BR /&gt;resident tmp1&lt;BR /&gt;order by SumVal desc&lt;BR /&gt;;&lt;BR /&gt;drop table tmp1;&lt;/P&gt;
&lt;P&gt;NEXT;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example in second line result of AccSumVal should be&amp;nbsp; (21626178,83 + 14&amp;nbsp;664&amp;nbsp;838,04)=36&amp;nbsp;291&amp;nbsp;016,87&amp;nbsp; but i dont understand why, result same as SumVal field&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UlkarA_1-1648643033541.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75745i9EE7DCF49D694E62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UlkarA_1-1648643033541.png" alt="UlkarA_1-1648643033541.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 12:26:29 GMT</pubDate>
    <dc:creator>UlkarA</dc:creator>
    <dc:date>2022-03-30T12:26:29Z</dc:date>
    <item>
      <title>Accumulative sum and group</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1911844#M75162</link>
      <description>&lt;P&gt;Hi everyone , I need to Accumulative sum , but this accumulation should be grouped by date (in my situation by month). I have script as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result:NoConcatenate Load * InLine [SumVal];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BOX:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;load distinct Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM') as DATE_REPORT&lt;BR /&gt;resident TRN_last&lt;BR /&gt;where DRCR_IND='D'&lt;BR /&gt;;&lt;BR /&gt;LET vNum=0;&lt;BR /&gt;LET NumRows=NoOfRows('BOX');&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(NumRows)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;LET vBox=Peek('DATE_REPORT',$(i));&lt;BR /&gt;LET vNum=vNum+1;&lt;BR /&gt;trace '$(vBox)';&lt;BR /&gt;trace '$(vBox)';&lt;BR /&gt;tmp1:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;load Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM') as DATE_REPORT, COMP_CUST_NO as comp_no,COMP_CUST_NAME as comp_name&lt;BR /&gt;, sum(LCY_AMOUNT) as SumVal &lt;BR /&gt;resident TRN_last&lt;BR /&gt;where DRCR_IND='D' and Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM')='$(vBox)'&lt;BR /&gt;group by Date(Floor(MonthStart(TRN_DT)) ,'YYYY MMM'), COMP_CUST_NO,COMP_CUST_NAME ;&lt;/P&gt;
&lt;P&gt;Concatenate(result)&lt;BR /&gt;load DATE_REPORT,comp_no,comp_name,SumVal,&lt;BR /&gt;rangesum(SumVal,peek('AccSumVal')) as AccSumVal, //result field&lt;BR /&gt;RowNo() as row_no,&lt;BR /&gt;AutoNumber(RowNo(),DATE_REPORT) as auto_num&lt;BR /&gt;resident tmp1&lt;BR /&gt;order by SumVal desc&lt;BR /&gt;;&lt;BR /&gt;drop table tmp1;&lt;/P&gt;
&lt;P&gt;NEXT;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example in second line result of AccSumVal should be&amp;nbsp; (21626178,83 + 14&amp;nbsp;664&amp;nbsp;838,04)=36&amp;nbsp;291&amp;nbsp;016,87&amp;nbsp; but i dont understand why, result same as SumVal field&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UlkarA_1-1648643033541.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75745i9EE7DCF49D694E62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UlkarA_1-1648643033541.png" alt="UlkarA_1-1648643033541.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 12:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1911844#M75162</guid>
      <dc:creator>UlkarA</dc:creator>
      <dc:date>2022-03-30T12:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum and group</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1919250#M75618</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Concatenate(result)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;load DATE_REPORT,comp_no,comp_name,SumVal,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;Remove the single quote&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RangeSum(SumVal,Peek(AccSumVal)) as AccSumVal&amp;nbsp;&amp;nbsp;//result field&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;RowNo() as row_no,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AutoNumber(RowNo(),DATE_REPORT) as auto_num&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resident tmp1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;order by SumVal desc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;drop table tmp1;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 08:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1919250#M75618</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-04-18T08:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum and group</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1919254#M75620</link>
      <description>&lt;P&gt;&lt;A href="https://tacobellbreakfastmenu.info/" target="_blank" rel="noopener"&gt;https://tacobellbreakfastmenu.info/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 08:43:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-and-group/m-p/1919254#M75620</guid>
      <dc:creator>undertess146</dc:creator>
      <dc:date>2022-04-18T08:43:18Z</dc:date>
    </item>
  </channel>
</rss>

