<?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 Load script : pb to create table with cumulated amount in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541302#M109322</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm facing a problem to create a table with cumulated amount from two tables.&lt;/P&gt;
&lt;P&gt;I have a table BUSINESS_PERIOD with two colums :&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;In this table you can find all period from the start of the business to the end.&lt;/P&gt;
&lt;P&gt;I have a second table BUSINESS_ORDER with three columns :&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;- Amount&lt;/P&gt;
&lt;P&gt;In this table you can find only period where there is an amount associated.&lt;/P&gt;
&lt;P&gt;I need to create a final table with three columns :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;- Amount&lt;/P&gt;
&lt;P&gt;In this final table all period of each business need to be present and the amount is cumulated each month with previous months for each business.&lt;/P&gt;
&lt;P&gt;You can find a screenshot of the tables with data in order to understand better.&lt;/P&gt;
&lt;P&gt;I can't find how to do it...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I someone has an idea to help ! thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2026 08:46:09 GMT</pubDate>
    <dc:creator>sdavinblanc</dc:creator>
    <dc:date>2026-01-22T08:46:09Z</dc:date>
    <item>
      <title>Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541302#M109322</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm facing a problem to create a table with cumulated amount from two tables.&lt;/P&gt;
&lt;P&gt;I have a table BUSINESS_PERIOD with two colums :&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;In this table you can find all period from the start of the business to the end.&lt;/P&gt;
&lt;P&gt;I have a second table BUSINESS_ORDER with three columns :&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;- Amount&lt;/P&gt;
&lt;P&gt;In this table you can find only period where there is an amount associated.&lt;/P&gt;
&lt;P&gt;I need to create a final table with three columns :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Business_code (Key)&lt;/P&gt;
&lt;P&gt;- Period (year month format : yyyymm).&lt;/P&gt;
&lt;P&gt;- Amount&lt;/P&gt;
&lt;P&gt;In this final table all period of each business need to be present and the amount is cumulated each month with previous months for each business.&lt;/P&gt;
&lt;P&gt;You can find a screenshot of the tables with data in order to understand better.&lt;/P&gt;
&lt;P&gt;I can't find how to do it...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I someone has an idea to help ! thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 08:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541302#M109322</guid>
      <dc:creator>sdavinblanc</dc:creator>
      <dc:date>2026-01-22T08:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541306#M109323</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;t1: load * from&amp;nbsp;&lt;SPAN&gt;BUSINESS_PERIOD; left join(t1) load * from&amp;nbsp;BUSINESS_ORDER;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;t2: load *,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Business_code&amp;nbsp;= previous(Business_code),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;peek('KumAmount') + Amount, Amount) as KumAmount&lt;BR /&gt;resident t1 order by&amp;nbsp;Business_code,&amp;nbsp;Period;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;drop tables t1;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 09:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541306#M109323</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-01-22T09:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541310#M109324</link>
      <description>&lt;P&gt;It's not working...I have no amount in the KumAmount&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 10:30:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541310#M109324</guid>
      <dc:creator>sdavinblanc</dc:creator>
      <dc:date>2026-01-22T10:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541313#M109325</link>
      <description>&lt;P&gt;Are all records with the periods + codes + amounts there - means the join as first step is working?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 10:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541313#M109325</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-01-22T10:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541314#M109326</link>
      <description>&lt;P&gt;Yes the join is working before using the previous and peek syntax.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 10:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541314#M109326</guid>
      <dc:creator>sdavinblanc</dc:creator>
      <dc:date>2026-01-22T10:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541315#M109327</link>
      <description>&lt;P&gt;Add a small adjustment to treat NULL as ZERO:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;t2: load *,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Business_code&amp;nbsp;= previous(Business_code),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rangesum(peek('KumAmount'), coalesce(Amount, 0)),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;coalesce(Amount, 0)) as KumAmount&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resident t1 order by&amp;nbsp;Business_code,&amp;nbsp;Period;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 10:46:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541315#M109327</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-01-22T10:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load script : pb to create table with cumulated amount</title>
      <link>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541321#M109329</link>
      <description>&lt;P&gt;It's working fine, thank you !&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 11:09:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-script-pb-to-create-table-with-cumulated-amount/m-p/2541321#M109329</guid>
      <dc:creator>sdavinblanc</dc:creator>
      <dc:date>2026-01-22T11:09:17Z</dc:date>
    </item>
  </channel>
</rss>

