<?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 Cumulative sum for two (or more) dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2459573#M98727</link>
    <description>&lt;P&gt;In QlikSense load script, how do i do cumulative sum for several dimensions?&lt;/P&gt;
&lt;P&gt;Given the following input data (regarding planned changes in capacity)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;StaffChanges:
  Load * inline [
    Period, Department, Change, Text
    202401, Dept1, 100, Baseline
    202402, Dept2, 100, Baseline
    202401, Dept3, 100, Baseline
    202403, Dept1, 10, Staff change
    202404, Dept2, -15, Staff change
    202404, Dept3, 25, Staff change
    202407, Dept3, -10, Staff change
    202401, Dept2, 50, Staff change
  ];
&lt;/LI-CODE&gt;
&lt;P&gt;How do I create a new table, showing the current staff in each department, by month?&lt;BR /&gt;&lt;BR /&gt;I want to do this in load script to ensure the data is fixed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 16:19:12 GMT</pubDate>
    <dc:creator>oddgeir</dc:creator>
    <dc:date>2024-06-05T16:19:12Z</dc:date>
    <item>
      <title>Cumulative sum for two (or more) dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2459573#M98727</link>
      <description>&lt;P&gt;In QlikSense load script, how do i do cumulative sum for several dimensions?&lt;/P&gt;
&lt;P&gt;Given the following input data (regarding planned changes in capacity)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;StaffChanges:
  Load * inline [
    Period, Department, Change, Text
    202401, Dept1, 100, Baseline
    202402, Dept2, 100, Baseline
    202401, Dept3, 100, Baseline
    202403, Dept1, 10, Staff change
    202404, Dept2, -15, Staff change
    202404, Dept3, 25, Staff change
    202407, Dept3, -10, Staff change
    202401, Dept2, 50, Staff change
  ];
&lt;/LI-CODE&gt;
&lt;P&gt;How do I create a new table, showing the current staff in each department, by month?&lt;BR /&gt;&lt;BR /&gt;I want to do this in load script to ensure the data is fixed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 16:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2459573#M98727</guid>
      <dc:creator>oddgeir</dc:creator>
      <dc:date>2024-06-05T16:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for two (or more) dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460175#M98775</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this:&lt;/P&gt;
&lt;DIV&gt;StaffChanges:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; Load * inline [&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Period, Department, Change, Text&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202401, Dept1, 100, Baseline&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202402, Dept2, 100, Baseline&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202401, Dept3, 100, Baseline&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202403, Dept1, 10, Staff change&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202404, Dept2, -15, Staff change&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202404, Dept3, 25, Staff change&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202407, Dept3, -10, Staff change&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 202401, Dept2, 50, Staff change&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; ];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;CurrentStaff:&lt;/DIV&gt;
&lt;DIV&gt;NoConcatenate Load&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Department,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Period,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; If(Department = Previous(Department), Peek(CurrentStaff) + Change, Change) as CurrentStaff&lt;/DIV&gt;
&lt;DIV&gt;Resident StaffChanges&lt;/DIV&gt;
&lt;DIV&gt;Order By Department, Period;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Drop Table StaffChanges;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the results are:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LorantPataki_0-1717752467323.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167510iA21315132DE88AE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LorantPataki_0-1717752467323.png" alt="LorantPataki_0-1717752467323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My only remark is that the oldest month for each department should contain the "Baseline", which is not the case for Dept2.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 09:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460175#M98775</guid>
      <dc:creator>LorantPataki</dc:creator>
      <dc:date>2024-06-07T09:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for two (or more) dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460194#M98777</link>
      <description>&lt;P&gt;Ahhh... thank you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this seems to be exactly what I was looking for, but just couldn't wrap my head around at the moment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for poor data quality in my dummy data. I was just making a few rows quckly and didn't capture everything.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 09:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460194#M98777</guid>
      <dc:creator>oddgeir</dc:creator>
      <dc:date>2024-06-07T09:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for two (or more) dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460195#M98778</link>
      <description>&lt;P&gt;Glad it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 10:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-sum-for-two-or-more-dimensions/m-p/2460195#M98778</guid>
      <dc:creator>LorantPataki</dc:creator>
      <dc:date>2024-06-07T10:01:57Z</dc:date>
    </item>
  </channel>
</rss>

