<?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: pyramid pattern using nested loops in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2129569#M91849</link>
    <description>&lt;P&gt;I'm not sure if I understand your aim right but I think your low-level programming approach isn't really suitable within Qlik because there are already various high-level features implemented which do the job and are simplifying a lot of work.&lt;/P&gt;
&lt;P&gt;In your case you may use&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-Crosstable-Load/ba-p/1468083" target="_blank"&gt;The Crosstable Load - Qlik Community - 1468083&lt;/A&gt;&amp;nbsp;to transform your crosstable into a stream-data structure. An aggregating isn't mandatory needed and if an accumulation is wanted within the data-model the usage of interrecord-functions like previous() or peek() within a sorted resident-load is probably a more suitable approach.&lt;/P&gt;
&lt;P&gt;Because of the fact that all records contain a date could these data be associated with a master-calendar whose fields might be used as dimensions/selections and/or set analysis conditions within the UI. And with above() and similar functions you could do there accumulations, too. Further possibilities are to create various flags like YTD or rolling periods in the master-calendar and/or applying any&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;to get an easy handling by overlapping dimension-values.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 13:07:17 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2023-10-18T13:07:17Z</dc:date>
    <item>
      <title>pyramid pattern using nested loops</title>
      <link>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2129248#M91838</link>
      <description>&lt;P&gt;Hello Wveryone,&lt;/P&gt;
&lt;P&gt;I would really appreciate if someone could help me out solving the following problem.&lt;/P&gt;
&lt;P&gt;Consider the table:&lt;/P&gt;
&lt;TABLE width="864px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="42.7812px" height="25px"&gt;Year&lt;/TD&gt;
&lt;TD width="40px"&gt;Konto&lt;/TD&gt;
&lt;TD width="82.8594px" height="25px"&gt;HSLVT&lt;/TD&gt;
&lt;TD width="70.2656px" height="25px"&gt;HSL01&lt;/TD&gt;
&lt;TD width="76.6094px" height="25px"&gt;HSL02&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;HSL03&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;HSL04&lt;/TD&gt;
&lt;TD width="76.3594px" height="25px"&gt;HSL05&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;HSL06&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;HSL07&lt;/TD&gt;
&lt;TD width="76.3594px" height="25px"&gt;HSL08&lt;/TD&gt;
&lt;TD width="79.5781px" height="25px"&gt;HSL09&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="42.7812px" height="25px"&gt;2023&lt;/TD&gt;
&lt;TD width="40px"&gt;39000&lt;/TD&gt;
&lt;TD width="82.8594px" height="25px"&gt;248.900,00&lt;/TD&gt;
&lt;TD width="70.2656px" height="25px"&gt;9233.83&lt;/TD&gt;
&lt;TD width="76.6094px" height="25px"&gt;-91132.67&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;-55.958,20&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;-13.432,00&lt;/TD&gt;
&lt;TD width="76.3594px" height="25px"&gt;84.089,00&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;-48.625,00&lt;/TD&gt;
&lt;TD width="79.5469px" height="25px"&gt;-31.077,00&lt;/TD&gt;
&lt;TD width="76.3594px" height="25px"&gt;16.231,00&lt;/TD&gt;
&lt;TD width="79.5781px" height="25px"&gt;-29.584,00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Task is to calculate all the values for Konto the total in each month in year. In this case it should look like:&lt;/P&gt;
&lt;TABLE width="797px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;Jan 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Feb 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Mrz 23&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;Apr 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Mai 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Jun 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Jul 23&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;Aug 23&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;Sep 23&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;258.133,83&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;167.001,16&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;111.042,96&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;97.610,96&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;181.699,96&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;133.074,96&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;101.997,96&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;118.228,96&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;88.644,96&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSLVT +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSLVT +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;HSL1&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL01 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL01 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL2 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL02 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL02 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL03&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;HSL03 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL03 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL03 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL03 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL03 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL03 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;HSL04&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL04 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL04 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL04 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL04 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL04 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL05&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL05 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL05 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL05 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL05 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL06&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL06 +&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL06 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL06 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL07&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL07 +&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL07 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;HSL08&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL08 +&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;HSL09&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8125px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="88.9062px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="86.8438px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to do it through a FOR loop and i get the needed Datum, but i don't get the needed Sum..&lt;/P&gt;
&lt;P&gt;i believe i have to use something similar as a&amp;nbsp;&lt;SPAN&gt;pyramid pattern using nested loops in Java, but it doesn't work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="americanetsMD_0-1697552173814.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118396iF361AB9687B5366F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="americanetsMD_0-1697552173814.png" alt="americanetsMD_0-1697552173814.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Currently i use this FOR loop:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For i = 1 to 12 step 1&lt;BR /&gt;If not i = 12 then&lt;BR /&gt;let vField = 'HSL' &amp;amp; Num($(i), '00');&lt;BR /&gt;Trace $(vField);&lt;BR /&gt;Concatenate [ResultTab]:&lt;BR /&gt;Load&lt;BR /&gt;Key,&lt;BR /&gt;ClientNr,&lt;BR /&gt;Jahr,&lt;BR /&gt;Currency,&lt;BR /&gt;Konto,&lt;BR /&gt;Sum($(vField))as Value,&lt;BR /&gt;MonthEnd(MakeDate(Jahr, $(i))) as Datum&lt;BR /&gt;Resident TemporaryTab&lt;BR /&gt;Where not(IsNull(ClientNr))&lt;BR /&gt;and Konto = '0003910000'&lt;BR /&gt;Group By Key, ClientNr, Jahr, Currency, Konto&lt;BR /&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;EndIf&lt;/P&gt;
&lt;P&gt;Next i&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 14:31:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2129248#M91838</guid>
      <dc:creator>americanetsMD</dc:creator>
      <dc:date>2023-10-17T14:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: pyramid pattern using nested loops</title>
      <link>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2129569#M91849</link>
      <description>&lt;P&gt;I'm not sure if I understand your aim right but I think your low-level programming approach isn't really suitable within Qlik because there are already various high-level features implemented which do the job and are simplifying a lot of work.&lt;/P&gt;
&lt;P&gt;In your case you may use&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-Crosstable-Load/ba-p/1468083" target="_blank"&gt;The Crosstable Load - Qlik Community - 1468083&lt;/A&gt;&amp;nbsp;to transform your crosstable into a stream-data structure. An aggregating isn't mandatory needed and if an accumulation is wanted within the data-model the usage of interrecord-functions like previous() or peek() within a sorted resident-load is probably a more suitable approach.&lt;/P&gt;
&lt;P&gt;Because of the fact that all records contain a date could these data be associated with a master-calendar whose fields might be used as dimensions/selections and/or set analysis conditions within the UI. And with above() and similar functions you could do there accumulations, too. Further possibilities are to create various flags like YTD or rolling periods in the master-calendar and/or applying any&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;to get an easy handling by overlapping dimension-values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 13:07:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2129569#M91849</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-10-18T13:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: pyramid pattern using nested loops</title>
      <link>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2131109#M91956</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;
&lt;P&gt;thank you very much for the tips. These were new for me. i have applied the As-Of-Table and it worked out nicely for my task. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/pyramid-pattern-using-nested-loops/m-p/2131109#M91956</guid>
      <dc:creator>americanetsMD</dc:creator>
      <dc:date>2023-10-23T14:15:14Z</dc:date>
    </item>
  </channel>
</rss>

