<?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 count duplicated data without using distinct in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838623#M1233530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Qlikview community &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one problem that I need help to solve.&lt;/P&gt;&lt;P&gt;I want to count the amount of differenct Document Numbers. It should be pretty easy but that is a twist.&lt;/P&gt;&lt;P&gt;The Document Number can have the same for difference Company Code.&lt;/P&gt;&lt;P&gt;So I have one document number 52001186 for company code 1100 and the same document number for company code 1000.&lt;/P&gt;&lt;P&gt;Which means that I can't use DISTINCT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use DISTINCT I get total of one document number.&lt;/P&gt;&lt;P&gt;I want the answer to be 2 because this is two company codes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 324px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="18" width="98"&gt;Vendor Name&lt;/TD&gt;&lt;TD class="xl66" width="115"&gt;Company Code&lt;/TD&gt;&lt;TD class="xl66" width="111"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Number&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl70"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl74"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;IKEA&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="18"&gt;Nestle&lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl76"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Darri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838623#M1233530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Qlikview community &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one problem that I need help to solve.&lt;/P&gt;&lt;P&gt;I want to count the amount of differenct Document Numbers. It should be pretty easy but that is a twist.&lt;/P&gt;&lt;P&gt;The Document Number can have the same for difference Company Code.&lt;/P&gt;&lt;P&gt;So I have one document number 52001186 for company code 1100 and the same document number for company code 1000.&lt;/P&gt;&lt;P&gt;Which means that I can't use DISTINCT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use DISTINCT I get total of one document number.&lt;/P&gt;&lt;P&gt;I want the answer to be 2 because this is two company codes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 324px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="18" width="98"&gt;Vendor Name&lt;/TD&gt;&lt;TD class="xl66" width="115"&gt;Company Code&lt;/TD&gt;&lt;TD class="xl66" width="111"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Number&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl70"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl74"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;IKEA&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="18"&gt;Nestle&lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl76"&gt;52001186&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Darri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838623#M1233530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838624#M1233532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concatenate the Company Code &amp;amp; Document Number, and then calculate the distinct count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 15:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838624#M1233532</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-06-05T15:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838625#M1233534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In terms of expression, this is what &lt;A _jive_internal="true" href="https://community.qlik.com/people/Colin_Albert"&gt;Colin Albert&lt;/A&gt;‌ means (if I am not wrong):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT [Document Number] &amp;amp; [Company Code])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checkout the text box object in the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 16:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838625#M1233534</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-05T16:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838626#M1233536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this. This might help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(count(DISTINCT [Document Number]),[Company Code])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 553px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="98"&gt;Company Code&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;DN&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;aggr(count(DISTINCT DN),[Company Code])&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;52001186&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;1100&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;52001186&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 16:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838626#M1233536</guid>
      <dc:creator>varunreddy</dc:creator>
      <dc:date>2015-06-05T16:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838627#M1233537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌in case the numbers are not fixed length you could add a seperator to avoid collisions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;=Count(DISTINCT [Document Number] &amp;amp;'/'&amp;amp; [Company Code])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;Hope this helps also.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;regards&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: rgba(255, 255, 255, 0);"&gt;Marco&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 20:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838627#M1233537</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-06-05T20:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to count duplicated data without using distinct</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838628#M1233538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code below - removing dublicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[tmpObjects]:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;Where Flag=0;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Previous(ICS_Field)=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;ICS_Field&lt;/SPAN&gt;,1,0) as Flag;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;Resident Objects;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Objects;&lt;/P&gt;&lt;P&gt;DROP Field Flag From tmpObjects;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 21:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-duplicated-data-without-using-distinct/m-p/838628#M1233538</guid>
      <dc:creator>lylererger</dc:creator>
      <dc:date>2015-06-05T21:09:47Z</dc:date>
    </item>
  </channel>
</rss>

