<?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 How to Aggr(count(CustomerNr),(CustomerNr) ) in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369261#M137283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Count(DISTINCT) instead of&lt;BR /&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2012 11:32:53 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2012-04-02T11:32:53Z</dc:date>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369254#M137276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Hi all you great people&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I hope someone can help me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I have this calculated dimension =Aggr(count(CustomerNr),(CustomerNr) ), to show how many times customers are shopping over the period I those.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Every time the customer shops, the use the same CustomerNr.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;My problem is that there are around 1 mill. Rows with CustomerNr and my PC is almost crashing every time I those a new period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Therefore I thought that I have to have that calculation in the script, but how do I do that ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369254#M137276</guid>
      <dc:creator />
      <dc:date>2012-03-26T12:31:14Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369255#M137277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well,&amp;nbsp; AGGR is not present at script time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should calculate with a separated LOAD ... RESIDENT ... GROUP BY &lt;SPAN style="font-family: Arial, sans-serif; background-color: #eef4f9;"&gt;CustomerNr&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 17:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369255#M137277</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2012-03-26T17:13:28Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369256#M137278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Hi Clever&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; Thanks for the answer. Unfortunately it don’t give me the correct result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;When I use&amp;nbsp; this, and the customer has &lt;/SPAN&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;purchased&lt;/SPAN&gt;&lt;/SPAN&gt; 2 times, it will always count as 2, regardless that I don’t choose the month 1 of the purchase are from.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;So it should in that example only be 1.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;This is what I want:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;CustomerNr&amp;nbsp;&amp;nbsp; Month&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;12&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; January&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;12&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; March &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;I would like the result to be:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;If I chose January the customers has 1 purchase&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;If I choose Jan, Feb and Mar the customer has 2 purchase&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;If I choose March the customer has 1 purchase&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN lang="EN" style="font-family: 'Calibri','sans-serif'; color: #333333;"&gt;If I choose February the customer has 0 purchase&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 09:54:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369256#M137278</guid>
      <dc:creator />
      <dc:date>2012-04-02T09:54:24Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369257#M137279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You are counting and grouping by the same field obviously it will give 1&lt;/P&gt;&lt;P&gt;Try to group by some other field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 10:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369257#M137279</guid>
      <dc:creator>sivarajs</dc:creator>
      <dc:date>2012-04-02T10:13:42Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369258#M137280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think using group by in script will not solve your purpose it will generate data for whole table and when you apply filters , it will generate wrong data (i.e total count after applying group by).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate group by for each selection, you have to use it in chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 10:58:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369258#M137280</guid>
      <dc:creator />
      <dc:date>2012-04-02T10:58:15Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369259#M137281</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;Add an additional column as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &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;1 AS CustomerCount&lt;/P&gt;&lt;P&gt;RESIDENT DataSource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your expression use Sum(CustomerCount) and use &lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;CustomerNr as Dimension.&amp;nbsp; Count uses more memory and it degrades the performance.&amp;nbsp; Try using the above logic, how this fine tunes the performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 10:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369259#M137281</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-04-02T10:59:59Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369260#M137282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think this will give me what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use the calculated Number of purchase as a Dimension and I want to be able to choose number of month to see over as I choose and the data has to follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expressions will be Count(distinct(CustomerNr))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works with the ﻿﻿﻿﻿﻿﻿Aggr(count(customerNr),(CustomerNr)) as a calculated dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 11:13:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369260#M137282</guid>
      <dc:creator />
      <dc:date>2012-04-02T11:13:16Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369261#M137283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Count(DISTINCT) instead of&lt;BR /&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 11:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369261#M137283</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2012-04-02T11:32:53Z</dc:date>
    </item>
    <item>
      <title>How to Aggr(count(CustomerNr),(CustomerNr) ) in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369262#M137284</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;Try this, it would be faster than your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &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;1 AS CustomerCount&lt;/P&gt;&lt;P&gt;RESIDENT DataSource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(Sum(CustomerCount),(CustomerNr))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 11:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Aggr-count-CustomerNr-CustomerNr-in-script/m-p/369262#M137284</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-04-02T11:38:03Z</dc:date>
    </item>
  </channel>
</rss>

