<?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: Calculating active status in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813135#M1049231</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;Thanks for this but is there any way I can do this in the load script rather than in the charts?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2014 10:01:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-12T10:01:11Z</dc:date>
    <item>
      <title>Calculating active status</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813133#M1049228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a qlikview newbie so I am slightly stumped by this problem. I need to calculate the 'Active' status of accounts at the end of each month where active is defined as having one or more transaction in the last 3 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data I have has&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Account Number,&lt;/P&gt;&lt;P&gt;Transaction Month (e.g. '01/10/2014' for Oct-14)&lt;/P&gt;&lt;P&gt;Number of credit transactions in Transaction Month&lt;/P&gt;&lt;P&gt;Number of debit transactions in Transaction Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate a flag such that if sum of credit and debit transactions over the last 3 Transactions months &amp;gt;0 then Active flag is 1, else 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus the flag at the end of say Jun-14 will be a sum of transactions from Apr-14 to Jun-14 and so on for each month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output will be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Account Number&lt;/P&gt;&lt;P&gt;Transaction Month&lt;/P&gt;&lt;P&gt;Active flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can I do it? It is the aggregation over previous two months that's stumping me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 20:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813133#M1049228</guid>
      <dc:creator />
      <dc:date>2014-11-11T20:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating active status</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813134#M1049229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would make sense that this chart have a single time context.&amp;nbsp; Say, todays date or perhaps the most recent date in the data set or even the most recent date in the active user's selection filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will that be the case&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF yes, Then it will be a relatively straight forward SET ANALSYIS statement/&amp;nbsp; If its today's date, then the SET statmenet would&amp;nbsp; to pick up a Date greater/equal&amp;nbsp; than todays date 3 months ago and less than/equal to todays date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;aggr(&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if ( sum&amp;nbsp; (&amp;nbsp;&amp;nbsp; {$&amp;lt;Date={"&amp;gt;=$(= Date(addmonths(Today(),-3))&amp;lt;=Date(Today())"}&amp;gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp; [Credit Transactions] + [Debit Tranactions]) &amp;gt; 0 ,&amp;nbsp;&amp;nbsp; 1) , Account))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also might need an aggr() statement to sum up the results of the 3 month subtotal per account (sum of sums).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can prep /share a data set that would help test / share a working example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 01:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813134#M1049229</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-12T01:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating active status</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813135#M1049231</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;Thanks for this but is there any way I can do this in the load script rather than in the charts?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 10:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813135#M1049231</guid>
      <dc:creator />
      <dc:date>2014-11-12T10:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating active status</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813136#M1049233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arbit - short answer is yes, but it would take a bit of time (not too long) to develop the script to do it. I may get time shortly , but just wanted to respond with the short answer...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 19:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-active-status/m-p/813136#M1049233</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-13T19:18:17Z</dc:date>
    </item>
  </channel>
</rss>

