<?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: Distinct Count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710342#M255893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why u r not using count (distinct fieldname) as fieldname1, and use fieldname 1 for division at chart level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 12:18:20 GMT</pubDate>
    <dc:creator>deepakqlikview_123</dc:creator>
    <dc:date>2014-09-04T12:18:20Z</dc:date>
    <item>
      <title>Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710341#M255892</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;I Need a help!!!!!!!!&lt;/P&gt;&lt;P&gt;I am having an table and i need to create an frequency based on the Customer and the Order.&lt;/P&gt;&lt;P&gt;I have used the formula of Count(Order ID)/Count(Distinct Customer).&lt;/P&gt;&lt;P&gt;But when i use Distinct it consumes more memory and my Qvs is getting disconnected.&lt;/P&gt;&lt;P&gt;As there is an millions of records.&lt;/P&gt;&lt;P&gt;Consider the below example for your reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 192px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="64"&gt;Customer&lt;/TD&gt;&lt;TD width="64"&gt;Date&lt;/TD&gt;&lt;TD width="64"&gt;Order ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1/1/2014&lt;/TD&gt;&lt;TD align="right"&gt;123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/1/2014&lt;/TD&gt;&lt;TD align="right"&gt;124&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;6/1/2014&lt;/TD&gt;&lt;TD align="right"&gt;154&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;b&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1/1/2014&lt;/TD&gt;&lt;TD align="right"&gt;985&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;b&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/1/2013&lt;/TD&gt;&lt;TD align="right"&gt;452&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;b&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;8/14/2013&lt;/TD&gt;&lt;TD align="right"&gt;854&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ferquency should be calculated based on the time dimensions(Date,Year....)&lt;/P&gt;&lt;P&gt;Expected result&lt;/P&gt;&lt;P&gt;If 2014 is selected i need to show 4/2=2i.e(count(Order ID)/ count( Distinct Customer)&lt;/P&gt;&lt;P&gt;if 2013 is selected 2/1=2&lt;/P&gt;&lt;P&gt;if jan to14 is selectd 2/2=1&lt;/P&gt;&lt;P&gt;Let me know if there is an way to achive this with out using an Count(Distinct)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:14:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710341#M255892</guid>
      <dc:creator />
      <dc:date>2014-09-04T12:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710342#M255893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why u r not using count (distinct fieldname) as fieldname1, and use fieldname 1 for division at chart level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710342#M255893</guid>
      <dc:creator>deepakqlikview_123</dc:creator>
      <dc:date>2014-09-04T12:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710343#M255894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i use count(Distinct fieldname) in the script it won't work based on the time selection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:20:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710343#M255894</guid>
      <dc:creator />
      <dc:date>2014-09-04T12:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710344#M255895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than use count distinct you can add a new table with a unique list of 'field name' and a numeric 1 value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;fieldname,&lt;/P&gt;&lt;P&gt;1 as fieldnamecount&lt;/P&gt;&lt;P&gt;resident &amp;lt;table&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then just use sum(fieldnamecount). Instead of count(distinct fieldnamecount).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710344#M255895</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-04T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710345#M255896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you can pre-calculate the number of customers per year in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710345#M255896</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-09-04T12:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710346#M255897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan that won´t work due to the time filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sampath: I just think about a solution. What definately helps a little bit is to create a new field e.g. Counter with always 1 as value. so your expressio will look like &lt;/P&gt;&lt;P&gt;sum(counter)/&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; count( Distinct Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that should also help a little, but of course the distinct is a single threaded function and does only use one core.&lt;/P&gt;&lt;P&gt;i try to also find a solution for this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710346#M255897</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2014-09-04T12:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710347#M255898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why it wouldn't .&amp;nbsp; Time filters will filter the main table and will filter to only the required customers in the lookup table through the associative model and should&amp;nbsp; result in accurate sums,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;consider this post (myth) about count distinct. Its a great post that also lays out alternatives to count distincts... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 13:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710347#M255898</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-04T13:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710348#M255899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, sorry!! I didn´t read that you suggested to do this in a seperate table with only the customers and the count field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 13:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count/m-p/710348#M255899</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2014-09-04T13:40:39Z</dc:date>
    </item>
  </channel>
</rss>

