<?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: How to calculate the difference between count and previous row count ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1678612#M449904</link>
    <description>&lt;P&gt;Bob, did the final post get you a working solution for your use case?&amp;nbsp; If so, do not forget to return to your thread and on that post, use the Accept as Solution button to mark it to give credit to the poster for the help and to let other Members know that did work for you.&amp;nbsp; The only other idea I had was to perhaps use variables, but the trick is if you are loading things an inconsistent number of times, that would not work, believe the other method proposed would be the way to go in that case.&lt;/P&gt;
&lt;P&gt;For future reference, you can also check the Design Blog area of the Community to see if you can find any ideas out there:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 15:54:52 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-02-24T15:54:52Z</dc:date>
    <item>
      <title>How to calculate the difference between count and previous row count ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670243#M449409</link>
      <description>&lt;P&gt;I need to calculate the difference between row count and previous row count that was overwritten later ?&lt;/P&gt;&lt;P&gt;For example , my data looks like this below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateTime&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row count&lt;/P&gt;&lt;P&gt;01/28/2019&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; 54&lt;/P&gt;&lt;P&gt;01/27/2019&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; 43&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I refresh the dashboard, the row count for 01/28(which is today) gets updated, so the new count looks like this below&lt;/P&gt;&lt;P&gt;DateTime&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row count&lt;/P&gt;&lt;P&gt;01/28/2019&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; 72&lt;/P&gt;&lt;P&gt;01/27/2019&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; 43&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I calculate the difference between the row count generated from the current run&amp;nbsp; and row count generated from the previous run ?&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, 29 Jan 2020 00:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670243#M449409</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2020-01-29T00:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate different between count and previous row count ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670250#M449412</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;You may store data from each&amp;nbsp;run into qvd (add or replace).&lt;BR /&gt;Then load this data and make calculation between stored and new rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 23:51:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670250#M449412</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2020-01-28T23:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate different between count and previous row count ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670252#M449413</link>
      <description>&lt;P&gt;It's just one qvd that gets overwritten again and again. So, how to&amp;nbsp; store the previous value that was already updated ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 00:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670252#M449413</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2020-01-29T00:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate different between count and previous row count ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670255#M449415</link>
      <description>&lt;P&gt;If you don't need a history then it will update on each reload.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF IsNull(filetime('RowCountPrior.qvd ')) THEN // Necessary for the first run when no qvd generated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;RowCountPrior:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;DateTime as DateTimePrior,&lt;/P&gt;&lt;P&gt;RowCount as&amp;nbsp;RowCountPrior&lt;/P&gt;&lt;P&gt;FROM source;&lt;/P&gt;&lt;P&gt;Store&amp;nbsp;RowCountPrior into RowCountPrior&lt;SPAN&gt;.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Drop Table&amp;nbsp;RowCountPrior;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RowCountTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DateTime , &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RowCount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'0' as&amp;nbsp;RowCountDiff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM source;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ELSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Map_PriorRowCount:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Mapping Load&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DateTimePrior,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;RowCountPrior&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM&amp;nbsp;RowCountPrior.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RowCountTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DateTime ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RowCount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RowCount - ApplyMap('Map_PriorRowCount', DateTime ) as&amp;nbsp;RowCountDiff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM source;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RowCountPrior:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;DateTime as DateTimePrior,&lt;/P&gt;&lt;P&gt;RowCount as&amp;nbsp;RowCountPrior&lt;/P&gt;&lt;P&gt;FROM source;&lt;/P&gt;&lt;P&gt;Store&amp;nbsp;RowCountPrior into RowCountPrior&lt;SPAN&gt;.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Drop Table&amp;nbsp;RowCountPrior;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you may skip the last step (RowCountPrior) and store into qvd from&amp;nbsp;&lt;SPAN&gt;RowCountTable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It depends on requirements..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 00:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1670255#M449415</guid>
      <dc:creator>Yevhenii_Senko</dc:creator>
      <dc:date>2020-01-29T00:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between count and previous row count ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1678612#M449904</link>
      <description>&lt;P&gt;Bob, did the final post get you a working solution for your use case?&amp;nbsp; If so, do not forget to return to your thread and on that post, use the Accept as Solution button to mark it to give credit to the poster for the help and to let other Members know that did work for you.&amp;nbsp; The only other idea I had was to perhaps use variables, but the trick is if you are loading things an inconsistent number of times, that would not work, believe the other method proposed would be the way to go in that case.&lt;/P&gt;
&lt;P&gt;For future reference, you can also check the Design Blog area of the Community to see if you can find any ideas out there:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 15:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-difference-between-count-and-previous-row/m-p/1678612#M449904</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-02-24T15:54:52Z</dc:date>
    </item>
  </channel>
</rss>

