<?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 count with 1 start value and shifted rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cumulative-count-with-1-start-value-and-shifted-rows/m-p/467960#M565468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following challenge:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set that contains:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;filenumber&lt;/P&gt;&lt;P&gt;Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date = only the first of the month: 20120101, 20120201 etc.&lt;/P&gt;&lt;P&gt;Filenumber = filenumbers that have to be counted per Date&lt;/P&gt;&lt;P&gt;Status = Running, New, Cancelled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Running Status has 15034 Filenumbers at 20120101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the new Running quantity for each month start:&lt;/P&gt;&lt;P&gt;20120101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15034&lt;/P&gt;&lt;P&gt;20120201&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15034 + New (387) - Cancelled (282)&lt;/P&gt;&lt;P&gt;20120301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15140 + New (131) - Cancelled (3658)&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the GUI the user can selected any date, for instance 20120301.&lt;/P&gt;&lt;P&gt;He/she has to see:&lt;/P&gt;&lt;P&gt;Running&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&lt;/P&gt;&lt;P&gt;New&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; 131&lt;/P&gt;&lt;P&gt;Cancelled&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3658&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make it even more challeging we need to shift the New and Cancelled numbers 1 row up. So they are displayed on the line of their previous month.&lt;/P&gt;&lt;P&gt;20120101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15034&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 387&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 282&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&lt;/P&gt;&lt;P&gt;20120201&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 131&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3658&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&lt;/P&gt;&lt;P&gt;20120301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Can this all be achieved in just the dashboard?&lt;/P&gt;&lt;P&gt;If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be calculated in the script, (with the use of intermediate tables if necessary).&lt;/P&gt;&lt;P&gt;If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Dec 2012 10:44:20 GMT</pubDate>
    <dc:creator>Michiel_QV_Fan</dc:creator>
    <dc:date>2012-12-27T10:44:20Z</dc:date>
    <item>
      <title>Cumulative count with 1 start value and shifted rows</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-with-1-start-value-and-shifted-rows/m-p/467960#M565468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following challenge:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set that contains:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;filenumber&lt;/P&gt;&lt;P&gt;Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date = only the first of the month: 20120101, 20120201 etc.&lt;/P&gt;&lt;P&gt;Filenumber = filenumbers that have to be counted per Date&lt;/P&gt;&lt;P&gt;Status = Running, New, Cancelled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Running Status has 15034 Filenumbers at 20120101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the new Running quantity for each month start:&lt;/P&gt;&lt;P&gt;20120101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15034&lt;/P&gt;&lt;P&gt;20120201&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15034 + New (387) - Cancelled (282)&lt;/P&gt;&lt;P&gt;20120301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15140 + New (131) - Cancelled (3658)&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the GUI the user can selected any date, for instance 20120301.&lt;/P&gt;&lt;P&gt;He/she has to see:&lt;/P&gt;&lt;P&gt;Running&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&lt;/P&gt;&lt;P&gt;New&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; 131&lt;/P&gt;&lt;P&gt;Cancelled&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3658&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make it even more challeging we need to shift the New and Cancelled numbers 1 row up. So they are displayed on the line of their previous month.&lt;/P&gt;&lt;P&gt;20120101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15034&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 387&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 282&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&lt;/P&gt;&lt;P&gt;20120201&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15140&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 131&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3658&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&lt;/P&gt;&lt;P&gt;20120301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11613&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Can this all be achieved in just the dashboard?&lt;/P&gt;&lt;P&gt;If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be calculated in the script, (with the use of intermediate tables if necessary).&lt;/P&gt;&lt;P&gt;If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 10:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-with-1-start-value-and-shifted-rows/m-p/467960#M565468</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2012-12-27T10:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count with 1 start value and shifted rows</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-with-1-start-value-and-shifted-rows/m-p/467961#M565469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can this all be achieved in just the dashboard?&lt;/P&gt;&lt;P&gt;Yes, with month as a table chart's dimension and the expression being something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Qty)+above(sum(if(Status='New',Qty))-above(sum(if(Status='Cancelled',Qty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ..... the above() function looks at the next row up&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can also be done in the script, by reloading the transaction table into a smaller summary table (or even as rows within the same table) and applying a Group By clause.&lt;/P&gt;&lt;P&gt;I would advise doing in the charts though as grouping in the script means you lose the ability to see results at a finer level of granularity, unless you allow for the possible dimensions in the group by clause.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 11:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-with-1-start-value-and-shifted-rows/m-p/467961#M565469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-27T11:46:57Z</dc:date>
    </item>
  </channel>
</rss>

