<?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: How to show duplicates? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536488#M1139523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would create this key in your script, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CO_CD &amp;amp; '-' &amp;amp; PRICE1 &amp;amp; '-' &amp;amp; CONTRACT_MONTHYEAR as %KEY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your straight table, use the formula Count(%KEY).&amp;nbsp; This will work as long as you have each of these fields as dimensions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know how you get on.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 12:59:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-18T12:59:59Z</dc:date>
    <item>
      <title>How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536487#M1139522</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;I have the following script and I would like to write an expression in a straight table to show where there are duplicate records based on CO_CD, PRICE1 and CONTRACT_MONTHYEAR being the same (all of these fields the same, rather than duplicate records within each field).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// Start of [QlikviewPhysical.xml] LOAD statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;RECORD:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRADE_TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRADE_STATUS_IND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;STRATEGY_NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRADE_NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DESK_CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OFFICE_CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRICE1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EXTENDED_AMT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CO_CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BS_IND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_WEEK&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_MONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CONTRACT_MONTHYEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; V:\ACL\ACL_Import\Qlikview\QlikviewPhysical.xml (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;XmlSimple&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [RECORDS/RECORD]);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// End of [QlikviewPhysical.xml] LOAD statements &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;ls this possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Any help would be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536487#M1139522</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2013-09-18T12:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536488#M1139523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would create this key in your script, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CO_CD &amp;amp; '-' &amp;amp; PRICE1 &amp;amp; '-' &amp;amp; CONTRACT_MONTHYEAR as %KEY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your straight table, use the formula Count(%KEY).&amp;nbsp; This will work as long as you have each of these fields as dimensions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know how you get on.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536488#M1139523</guid>
      <dc:creator />
      <dc:date>2013-09-18T12:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536489#M1139525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your reply.&amp;nbsp; That idea works perfectly and I have now created a straight table showing the count of %KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to able the best way to restrict the table to only show where the %KEY count of distinct TRADE_NUM is greater than 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536489#M1139525</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2013-09-18T14:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536490#M1139526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's a couple of ways of doing this.&amp;nbsp; You could simply create an expression that only shows items above 2, such as;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(count(%KEY)&amp;lt;=2,0,count(%KEY))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which will only ever return the duplicates.&amp;nbsp; Or you could create a Calculated Dimension, using the formula;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(count(%KEY)&amp;lt;=2, 'Not Duplicate', 'Duplicate')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This second option will give you more flexibility to filter on the Calculated Dimension, so you can see everything, just the Duplicates, or just the Non-Duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you mark my answer correct if I get it right?&amp;nbsp; And let me know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536490#M1139526</guid>
      <dc:creator />
      <dc:date>2013-09-18T14:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536491#M1139527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That first idea works great, thanks for your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to advise how I can use that idea and only show DISTINCT TRADE_NUM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:43:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536491#M1139527</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2013-09-18T14:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536492#M1139529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should you only be getting one record for each TRADE_NUM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so just use the same formula for a calculated dimension;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(count(TRADE_NUM)&amp;lt;=2, 'Not Duplicate', 'Duplicate')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, TRADE_NUM will have to be a dimension for this to work.&amp;nbsp; Does this work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536492#M1139529</guid>
      <dc:creator />
      <dc:date>2013-09-18T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536493#M1139530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each trade number can have multiple settlements against it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I want to only show duplicates where the TRADE_NUM is distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I input the above as a calculated dimension, I receive //Error in calculation in my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 14:56:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536493#M1139530</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2013-09-18T14:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to show duplicates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536494#M1139532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without doing any testing, I believe you can change the formula to also be dependent upon whether there is only one distinct TRADE_NUM, like so;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(count(%KEY)&amp;lt;=2 AND count(DISTINCT TRADE_NUM) = 1 , 0 , count(%KEY))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you could use the below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if( (count(%KEY)/Count(TRADE_NUM)) &amp;lt;= 2,0, (count(%KEY)/Count(TRADE_NUM)) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 15:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-duplicates/m-p/536494#M1139532</guid>
      <dc:creator />
      <dc:date>2013-09-18T15:11:43Z</dc:date>
    </item>
  </channel>
</rss>

