<?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: Previous and Current month data comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951278#M327192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you expect anyone to do with these screenshots...&lt;/P&gt;&lt;P&gt;You need to upload a .qvw document containing sample data so that someone can assist you with your expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Nov 2015 09:50:26 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-11-11T09:50:26Z</dc:date>
    <item>
      <title>Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951273#M327187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist me, I’ve been cracking my skull over this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my data set I have a field &lt;STRONG&gt;class&lt;/STRONG&gt; the holds several outcomes, but I’m interested in the two outcomes &lt;STRONG&gt;legal&lt;/STRONG&gt; and &lt;STRONG&gt;not legal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to sum the &lt;STRONG&gt;total amount&lt;/STRONG&gt; when the following conditions are satisfied:&lt;/P&gt;&lt;P&gt;- in the previous month, the &lt;STRONG&gt;account number&lt;/STRONG&gt;'s &lt;STRONG&gt;class&lt;/STRONG&gt; was &lt;STRONG&gt;not legal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- and current month, the &lt;STRONG&gt;account number&lt;/STRONG&gt;'s &lt;STRONG&gt;class&lt;/STRONG&gt; is &lt;STRONG&gt;legal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;In summary I want to sum &lt;STRONG&gt;total amount&lt;/STRONG&gt; for only the &lt;STRONG&gt;account number&lt;/STRONG&gt; that have transitioned from &lt;STRONG&gt;not legal&lt;/STRONG&gt; (in the previous month) to &lt;STRONG&gt;legal&lt;/STRONG&gt; (current month)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assistance will be highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mbini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 10:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951273#M327187</guid>
      <dc:creator />
      <dc:date>2015-11-06T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951274#M327188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a small qlikview document with example data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 14:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951274#M327188</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-11-10T14:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951275#M327189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should make a flag that indicates the number of account number's that aren't legal and those who are legal like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([account desctiption] = 'not legal', 1, 0) as flagNotLegal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([account description] = 'legal', 1, 0) as flagLegal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in a chart make something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;AccountNumber =, Month = {$(=(num(month(addmonths(max(date($(=Max(Year)) &amp;amp; '-' &amp;amp; num($(=max(num(Month))),'00') &amp;amp; '-' &amp;amp; '01', 'YYYY-MM-DD')),-1)))))} &amp;gt;} flagNotLegal) &lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;AccountNumber =, Month = {$(=max(num(Month))}&amp;gt;} flagLegal)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 14:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951275#M327189</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2015-11-10T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951276#M327190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Gybert has suggested an example would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the information you have supplied I would be looking at a flag in the data as the script.&lt;/P&gt;&lt;P&gt;Would need to make an aggregated table ordered by date, then use the peek() or Previous() function to flag the relevant rows of data.&lt;/P&gt;&lt;P&gt;Then SUM({&amp;lt;Flag=1&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 14:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951276#M327190</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2015-11-10T14:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951277#M327191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for responding this late, heres some sample data:&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105118_1.jpg" style="height: 126px; width: 620px;" /&gt;&lt;IMG alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/105125_2.jpg" style="height: 135px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 08:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951277#M327191</guid>
      <dc:creator />
      <dc:date>2015-11-11T08:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous and Current month data comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951278#M327192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you expect anyone to do with these screenshots...&lt;/P&gt;&lt;P&gt;You need to upload a .qvw document containing sample data so that someone can assist you with your expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 09:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-and-Current-month-data-comparison/m-p/951278#M327192</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-11-11T09:50:26Z</dc:date>
    </item>
  </channel>
</rss>

