<?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 Count distinct &amp;quot;accumulated&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334358#M493299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem: I want to count the distinct values, grouped by date, BUT the distinct must be accumulated. Let me try to explain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Day 05/15: 5 new registers&lt;/P&gt;&lt;P&gt;Day 05/16: 10 registers, but only 5 new (the other 5 registered in 05/15)&lt;/P&gt;&lt;P&gt;Day 05/17: 10 registers, but 0 new (all them registered between 15 and 16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL I would do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COUNT(DISTINCT c1.consumer), c1.date&lt;/P&gt;&lt;P&gt;FROM registration r1&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS (SELECT 1 FROM registration r2 WHERE r2.date &amp;lt; r1.date AND r2.consumer = r1.consumer)&lt;/P&gt;&lt;P&gt;GROUP BY c1.date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jun 2012 20:37:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-01T20:37:23Z</dc:date>
    <item>
      <title>Count distinct "accumulated"</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334358#M493299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem: I want to count the distinct values, grouped by date, BUT the distinct must be accumulated. Let me try to explain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Day 05/15: 5 new registers&lt;/P&gt;&lt;P&gt;Day 05/16: 10 registers, but only 5 new (the other 5 registered in 05/15)&lt;/P&gt;&lt;P&gt;Day 05/17: 10 registers, but 0 new (all them registered between 15 and 16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL I would do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COUNT(DISTINCT c1.consumer), c1.date&lt;/P&gt;&lt;P&gt;FROM registration r1&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS (SELECT 1 FROM registration r2 WHERE r2.date &amp;lt; r1.date AND r2.consumer = r1.consumer)&lt;/P&gt;&lt;P&gt;GROUP BY c1.date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 20:37:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334358#M493299</guid>
      <dc:creator />
      <dc:date>2012-06-01T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Count distinct "accumulated"</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334359#M493300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi if your consumer&amp;nbsp; are the key should be the next formulation in the object&lt;/P&gt;&lt;P&gt;Count (Distinct Consumer) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Salu2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 21:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334359#M493300</guid>
      <dc:creator />
      <dc:date>2012-06-01T21:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct "accumulated"</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334360#M493301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your script, you could do it in two steps ( I assume your register dates are of&amp;nbsp; QV date type with a numerical representation):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Registers as NewRegisters, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;min(Date) as Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident YourRegistersTable group by Registers;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will create a table with new registers per date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can just count these NewRegisters in a chart table expression grouped by Date or do similar in the script then (in another load).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, as a pure front end solution and still sensitive to some selections in other fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a chart with dimension Date (but &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/alert.png" /&gt; this Date's load order needs to be chronological) and as expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count(aggr( Registers, Registers)) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The implicite distinct qualifier of the aggr() function will do the job needed here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 21:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334360#M493301</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-01T21:47:10Z</dc:date>
    </item>
    <item>
      <title>Count distinct "accumulated"</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334361#M493302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the aggr function does exactly what I needed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 12:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334361#M493302</guid>
      <dc:creator />
      <dc:date>2012-06-04T12:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct "accumulated"</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334362#M493303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iván, esto no tiene en cuenta el comportamiento que él quiere con los días, la idea es que &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;en el primer día estén los registros de ese día&lt;/P&gt;&lt;P&gt;en el segundo estén los del primero MAS los NUEVOS del segundo&lt;/P&gt;&lt;P&gt;en el tercero, los del primero, MAS los nuevos del segundo, más los nuevos del tercero...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;y así&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;estoy trabajando en esto y creo que he llegado a una solución, estoy haciendo pruebas, si algo la posteo al rato&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 14:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-quot-accumulated-quot/m-p/334362#M493303</guid>
      <dc:creator />
      <dc:date>2014-11-25T14:00:41Z</dc:date>
    </item>
  </channel>
</rss>

