<?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: [Perfect Key]? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360571#M133895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for chipping in and for sharing your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In QlikView, once the tables have been loaded, key fields are actually ONE field (one listbox), not two fields as it happens in a relational model. In your example 2, the field InvoiceID is not 100% populated with unique values, because it has repeated values and there is no full correspondence between both tables, therefore the primary key and the key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I mentioned the 1:n relationship. Or to put my own post in different words: if the field is 100% populated with unique values, and these values have a relationship of 1:1 (in your example 1, InvoiceID), then is a perfect key, otherwise is a primary key or a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see any differences here between what we both say, in your example 1, InvoiceID is a perfect key because all values in that field alone are unique, and the field is populated 100% in the model, isn't it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If values are not unique, then there is not a 1:1 relationship, that means, if values are 1:n then there is no possible "unique" values, because they are not unique but repeated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I'd strongly recommend you to create a Document where you explain with as much detail as possible the findings on keys, even attaching a small sample QVW, so people can download it or print it as PDF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2012 09:33:17 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2012-12-21T09:33:17Z</dc:date>
    <item>
      <title>[Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360567#M133891</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;&lt;/P&gt;&lt;P&gt;Please see this screenshot from my data model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="16659" class="jive-image" alt="PerfectKey.gif" src="https://community.qlik.com/legacyfs/online/16659_PerfectKey.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please explain what "Perfect Key" means?&amp;nbsp; Not every key has it.&amp;nbsp; I do like to think my model is perfect &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 09:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360567#M133891</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-06-20T09:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360568#M133892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That means that the field is populated with 100% different unique values. That's not always the case because the key value can be more than once in the same field (for example, in a 1:n relation i. e.: invoice header - invoice details).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 10:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360568#M133892</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-06-20T10:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360569#M133893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah - that would make sense!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Miguel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 10:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360569#M133893</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-06-20T10:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360570#M133894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not found these definitions on the reference manual, therfore I have decided to find the answer on my own, but it seems to be different from your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that the definition that you have given is actually the definition of &lt;STRONG&gt;[Primary Key]&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;[Perfect Key]&lt;/STRONG&gt; is a bit more: &lt;STRONG style="text-decoration: underline;"&gt;it is a [Primary Key] (unique) with no "orphans"&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me clarify this with 2 examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, InvoiceID is &lt;STRONG&gt;[Key]&lt;/STRONG&gt; in InvoiceDetails and &lt;STRONG&gt;[Perfect Key]&lt;/STRONG&gt; in Invoices: it is unique and it has no orphans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inv003,1,PR01,10,50&lt;/STRONG&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;Invoices:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, InvoiceID is &lt;STRONG&gt;[Key]&lt;/STRONG&gt; in InvoiceDetails and &lt;STRONG&gt;[Primary Key]&lt;/STRONG&gt; in Invoices. There is a value in InvoiceDetails, &lt;STRONG&gt;Inv003,&lt;/STRONG&gt; that does not find a corresponding value in the Invoices table. This is called a "orphan". For this reason&lt;SPAN style="text-decoration: underline;"&gt; InvoiceID is not anymore perfect, but it is still primary&lt;/SPAN&gt;, because it is unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you copy-paste the example you can verify it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that it all makes sense to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason, if you both agree, I would kindly ask you to mark this post as correct answer. this would perhaps help other developers. I have been helped a lot so far, and i would be very happy to begin to give my small contribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 16:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360570#M133894</guid>
      <dc:creator>francescopuppin</dc:creator>
      <dc:date>2012-12-19T16:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360571#M133895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for chipping in and for sharing your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In QlikView, once the tables have been loaded, key fields are actually ONE field (one listbox), not two fields as it happens in a relational model. In your example 2, the field InvoiceID is not 100% populated with unique values, because it has repeated values and there is no full correspondence between both tables, therefore the primary key and the key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I mentioned the 1:n relationship. Or to put my own post in different words: if the field is 100% populated with unique values, and these values have a relationship of 1:1 (in your example 1, InvoiceID), then is a perfect key, otherwise is a primary key or a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see any differences here between what we both say, in your example 1, InvoiceID is a perfect key because all values in that field alone are unique, and the field is populated 100% in the model, isn't it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If values are not unique, then there is not a 1:1 relationship, that means, if values are 1:n then there is no possible "unique" values, because they are not unique but repeated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I'd strongly recommend you to create a Document where you explain with as much detail as possible the findings on keys, even attaching a small sample QVW, so people can download it or print it as PDF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 09:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360571#M133895</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-12-21T09:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360572#M133896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;your definition of perfect key and primary key is different from the definition of Qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please follow these steps:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Copy this text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceDetails:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD *&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INLINE [&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Invoices:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD *&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INLINE [&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,CL0001&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,CL0002&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Paste it in a new Qlkview document, save it and run it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Go to the Table Editor and put the mouse on the field invoice ID of the table &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Invoices&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) You will notice the evidence: Qlikview says that it si a perfect key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Read again your phrase &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;if the field is 100% populated with unique values, and these values have a relationship of 1:1 (in your example 1, InvoiceID), then is a perfect key, otherwise is a primary key or a key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Observe the data: it is a 1:n relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the field invoice ID of the table &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Invoices &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;is 100% populated with unique values, but it is on a 1:n relationship. Hence, according to your definition, it is a Primary Key. But according to Qliktech it is a Perfect key. Now we have just one choice: should we trust you or Qliktech?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So, I hope that it is clear now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The definition of Perfect key is the following: A Perfect Key is a key populated with unique values, and it must have ALL the values that are in the associated fields. Or, to say the same concept in a Qlikview terminology, the Perfect key is a Primary Key with Subset Ratio = 100%.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yo uhave time, please run also the example 2: you will notice that it's downgraded to primary key, because it does not have the value &lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv003&lt;/STRONG&gt;, therefore now the subset ratio is 67% (which means 2 values out of the 3 existing)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope that you will correct your definitions now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360572#M133896</guid>
      <dc:creator>francescopuppin</dc:creator>
      <dc:date>2013-01-24T17:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360573#M133897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh my God, I have a terrible suspect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel, please let's clarify. The relation between the 2 tables, in the example 1 (here below, again), in your opinion, is it 1:1&amp;nbsp; or is it 1:n?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because.. if you are saying that it is 1:1, then we have a big problem &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceDetails:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD *&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INLINE [&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Invoices:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD *&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INLINE [&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv001,CL0001&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Inv002,CL0002&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:51:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360573#M133897</guid>
      <dc:creator>francescopuppin</dc:creator>
      <dc:date>2013-01-24T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360574#M133898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please&amp;nbsp; find the my load script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0003&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;-&amp;gt; Here InvoiceID is Null&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0004&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, here showing Invoice is Perfect Key and Information density 100% and Subset ration 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Invoice.bmp" class="jive-image" src="https://community.qlik.com/legacyfs/online/50814_Invoice.bmp" /&gt;&lt;/P&gt;&lt;P&gt;I have doubt, perfect key always Unique Id and Not null(Unique + Not Null) values right? &lt;/P&gt;&lt;P&gt;And,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InvoiceDetails:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,4,PR04,20,700&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Invoice_details.bmp" class="jive-image" src="https://community.qlik.com/legacyfs/online/50815_Invoice_details.bmp" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here InvoiceID is 5th row is null, still showing Key and Information density 100% and Subset ration 100%.&lt;/P&gt;&lt;P&gt;i am bit confusion,&lt;/P&gt;&lt;P&gt;1.Perfect Key always Primary key,Unique Id and not null values Properly?&lt;/P&gt;&lt;P&gt;2.Subset ratio 100% means always having values Properly? .&lt;/P&gt;&lt;P&gt;if i understand wrong plz excuse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;raja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 17:14:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360574#M133898</guid>
      <dc:creator />
      <dc:date>2013-12-24T17:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360575#M133899</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;in this case Qlikview is definitely wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that you are using an old version of Qlikview (maybe 9?). I have heard that this bug of Qlikview has been fixed later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just put the code in QV 11 Personal, and it shows [Key] on both sides, as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the density is wrong, and it appears wrong also in my version. This is probably because the spaces in the inline are seen as data.. But if you amend the code as follows, the density will change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LEN(TRIM(InvoiceID)) AS LEN,&lt;/P&gt;&lt;P&gt;IF(LEN(TRIM(InvoiceID))=0,Null(),InvoiceID) AS InvoiceID,&lt;/P&gt;&lt;P&gt;ClientID&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0003&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0004&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,4,PR04,20,700&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how I see it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/50880_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has density 50% (2 NULLs out of 4 records) and subset rati 67% (2 values out of 3, because the space is counted as a value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you change the code even more, you will have the most correct picture:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LEN(TRIM(InvoiceID)) AS LEN,&lt;/P&gt;&lt;P&gt;IF(LEN(TRIM(InvoiceID))=0,Null(),InvoiceID) AS InvoiceID,&lt;/P&gt;&lt;P&gt;ClientID&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0003&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CL0004&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;IF(LEN(TRIM(InvoiceID))=0,Null(),InvoiceID) AS InvoiceID,&lt;/P&gt;&lt;P&gt;InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,4,PR04,20,700&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/50891_pastedImage_4.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course the data set is for test.. but for a correct data set you should never have a missing invoice ID!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Dec 2013 23:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360575#M133899</guid>
      <dc:creator>francescopuppin</dc:creator>
      <dc:date>2013-12-28T23:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360576#M133900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the Book QlikView 11 for Developers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The name of the field. Optionally, if the field is a key field, a qualifier is shown enclosed in square brackets. This qualifier indicates the following levels of key quality:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Perfect Key] indicates that every row contains a key value, and that all of these key values are unique. At the same time, the field's subset ratio is 100 percent. This qualifier should be seen in dimension tables, where every key should uniquely identify a single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Primary Key] indicates that all key values are unique, but not every row contains a key value or the field's subset ratio is less&amp;nbsp; than 100 percent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Key] indicates that the key is not unique. This qualifier is usually seen in fact tables, where the same dimension value may be associated with many different facts."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 04:02:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360576#M133900</guid>
      <dc:creator />
      <dc:date>2014-11-04T04:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360577#M133901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Precise and &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;accurate&lt;/STRONG&gt;&lt;/SPAN&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this Francesco!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KRgrds,&lt;/P&gt;&lt;P&gt;Paul E.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2015 23:05:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360577#M133901</guid>
      <dc:creator />
      <dc:date>2015-05-16T23:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360578#M133902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide me Qview Developer 11 Pdf if you have&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 09:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360578#M133902</guid>
      <dc:creator>navaskhan</dc:creator>
      <dc:date>2016-04-20T09:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360579#M133903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me try as well...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;REF: QlikView 11 For Developers..&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Information density&lt;/STRONG&gt; of the field, which indicates the percentage of rows that &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;contain a non-null value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Subset ratio&lt;/STRONG&gt;, which shows the percentage of all distinct values for a field in the&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;table compared to all the distinct values for that field in the entire data model. It is&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;only relevant for key fields since they are present in multiple tables and do not all&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;share the same value.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Subset ratios can be used to easily spot problems in key field&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;associations.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For example, when the combined total of subset ratios for multiple&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;tables is 100 percent, this may indicate that there are no matching keys between&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;these tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit;"&gt;Let me give you simple example&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sales:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * Inline&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Customer, Sales&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A, 100&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; B, 200&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; D, 300&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Customer:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * Inline&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Customer&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; C&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you write above sample script and will check the Table (CTRL + T), you will find two tables.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sales and Customers&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;On Sales Table, if you hover the mouse on Customer field, you can see the Subset Ratio is 75% because there is not sales data for Customer C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now if you change the script for table Customer like below..&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Customer:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * Inline&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Customer&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; C&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where Exists (Customer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If will not load the Customer C as there are no sales data for the same.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now check the Subset Ratio. It will be 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If subset ratio is less than 100%, the key is called as Primary Key&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;but for 100% it is called as Perfect Key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 08:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360579#M133903</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-05-10T08:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360580#M133904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;First of all, I like the explanation of Primary key using orphan as well as the simplify one - Primary Key is Perfect Key with subset ratio less then 100%.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Nonetheless, I'm still trying to understand the following statement (which somehow I thought it is not correct or perhaps I am missing some concept in Qlik Data Model, and therefore, may be someone can share their views):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #ff0000;"&gt;'[Primary Key] indicates that all key values are unique,&lt;STRONG style="text-decoration: underline;"&gt; but not every row contains a key value&lt;/STRONG&gt; or the field's subset ratio is less&amp;nbsp; than 100 percent'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SO in the following example given:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;InvoiceDetails:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;INLINE [&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv003,1,PR03,10,800&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Invoices:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;INLINE [&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv001,CL0001&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;Inv002,CL0002&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;As explained, InvoiceID is a Primary Key in Invoces table only because there is an InvoiceID (Inv003) in INVOICEDETAILS table that is not shown in Invoices table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;But the &lt;SPAN style="text-decoration: underline;"&gt;every ROW in INVOICES table contains a Key Value&lt;/SPAN&gt; (which is contradict to the statement above).&amp;nbsp; I wanna think that this explanation based on both tables have been joined, but then, the InvoiceID is not unique per row anymore and would become 'Key'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;Hope someone can help to explain.&amp;nbsp; Thanks.&amp;nbsp; &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: Arial; color: #737373;"&gt;&lt;STRONG style="color: #000000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 02:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360580#M133904</guid>
      <dc:creator>David-Wong</dc:creator>
      <dc:date>2016-11-18T02:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360581#M133905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Manish i think u r correct, your explanation is meaningful. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 04:34:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360581#M133905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-22T04:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: [Perfect Key]?</title>
      <link>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360582#M133906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it appears that there is a bit missing from that explanation from the QlikView Developers book from NoStarch. One extra criteria is that this would be a perfect key, except there is a key in the data model that the &lt;SPAN style="font-size: 10pt;"&gt;Invoices table doesn’t have a match for - in other words it’s ”dangling”. This means as it can’t be a perfect key, then it must be a primary key.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Dec 2017 19:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perfect-Key/m-p/360582#M133906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-31T19:49:37Z</dc:date>
    </item>
  </channel>
</rss>

