<?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: Cumulative count distinct in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321311#M516058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbaert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's exactly how I solved this issue just some hours before your answer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 08:17:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-04-04T08:17:59Z</dc:date>
    <item>
      <title>Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321305#M516052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to calculate a cumulative count distinct from the very beginning of my data. The "distinct" has to consider the whole data set of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using this formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count(distinct [Number of Active Suppliers])&amp;lt;&amp;gt;0,num(count({&amp;lt;MonthYear={'&amp;lt;=$(=max(MonthYear))'},Year,Month&amp;gt;} total &amp;lt;MonthYear&amp;gt;distinct [Number of Active Suppliers]), '#.##0'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is fine for monthly values, but it does not work when I make multiple selections on months (for every month I get the value of the last one selected).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Matteo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 18:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321305#M516052</guid>
      <dc:creator />
      <dc:date>2017-03-31T18:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321306#M516053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you'll have to use an AsOf table in this case. With sums you have other options but those don't work for a cumulative count distinct. Perhaps this document helps: &lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Apr 2017 07:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321306#M516053</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-04-01T07:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321307#M516054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the AsOf table as you suggested, in particular using this process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can accumulate intra-year values very easily, but how can I use this approach to get accumulated values from 2004 up to now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Apr 2017 15:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321307#M516054</guid>
      <dc:creator />
      <dc:date>2017-04-01T15:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321308#M516055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just noticed that you commented Henric's blog regarding my specific problem. In fact the biggest problem I am facing at the moment is that the selections on the dashboard must be made on "normal month" and "normal year" fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, as you correctly pointed out in your comment, it seems that AsOfMonth field works on the contrary if the selections are made on "normal" date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you developed a work around for this situation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, my formula is:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearDiff&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;lt;=13'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AsOfMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;lt;=$(=min(AsOfMonth))'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Number of Active Suppliers]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issues are:&lt;/P&gt;&lt;P&gt;- make the set analysis select the proper value for AsOfMonth (for multiple selections as well)&lt;/P&gt;&lt;P&gt;- showing values ONLY for the selected year, maintaining the accumulation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Apr 2017 16:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321308#M516055</guid>
      <dc:creator />
      <dc:date>2017-04-01T16:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321309#M516056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;AsOfMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'&amp;gt;=$(=Date(MakeDate(2014),'YYYY MMM'))&amp;lt;=$(=Date(Today(),'YYYY MMM'))'},&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;}&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Number of Active Suppliers]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to adjust the date format string to whatever your AsOfMonth values have&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321309#M516056</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-04-03T17:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321310#M516057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- make the set analysis select the proper value for AsOfMonth (for multiple selections as well)&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- showing values ONLY for the selected year, maintaining the accumulation&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you want to use the selections in your regular Year and Month fields as selections for the AsOf fields then do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;AsOf&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;STRONG&gt;P(Year),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;AsOfMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;STRONG&gt;P(Month)&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;}&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Number of Active Suppliers]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321310#M516057</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-04-03T17:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative count distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321311#M516058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbaert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's exactly how I solved this issue just some hours before your answer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 08:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-count-distinct/m-p/1321311#M516058</guid>
      <dc:creator />
      <dc:date>2017-04-04T08:17:59Z</dc:date>
    </item>
  </channel>
</rss>

