<?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: Composite key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10724#M774596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jerry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is fixed. I got correct values!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again&lt;/P&gt;&lt;P&gt;Abdallah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2018 13:28:34 GMT</pubDate>
    <dc:creator>absekrafi</dc:creator>
    <dc:date>2018-05-14T13:28:34Z</dc:date>
    <item>
      <title>Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10716#M774588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to add a composite key to remove a synthetic table and to add 2 new fields to an existing table (originally having 2 fields) in order it maches with an other table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is correct except when I have a composite code of 4 fields all fields different from null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;CodesKey&lt;/STRONG&gt;&amp;nbsp; when the &lt;STRONG&gt;result&lt;/STRONG&gt; &lt;STRONG&gt;is&lt;/STRONG&gt; &lt;STRONG&gt;wrong (not existing)&lt;/STRONG&gt; are : (3-1-9-1) and (4-1-6-1) and (7-1-13-1) and (8-1-14-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;results&lt;/STRONG&gt; &lt;STRONG&gt;are&lt;/STRONG&gt; &lt;STRONG&gt;correct&lt;/STRONG&gt; when &lt;STRONG&gt;CodesKey is equal to :&amp;nbsp; (1-1--) or (1-2--) or (7-2--) or (--6-2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please point me to what I did wrong in my code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find enclosed my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10716#M774588</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10717#M774589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not compulsory to use composite key to remove synthetic Keys. You can rename the fields when you need not to use those fields to form an association. Using Null values will not yield to uniqueness that would produce a solid and correct join. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One need to&amp;nbsp; understand the reason while you choose to use null as the best approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 18:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10717#M774589</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2018-05-09T18:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10718#M774590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used null() in INOUT table to &lt;STRONG&gt;create 2 new fields&lt;/STRONG&gt;. This table contain originally only 2 fields codeart and codesart, but I need to rename (associate) these 2 fields to (codemp, codesmp) or (codprod, codsprod) depending on typeart field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if typeart = 'M'&lt;/P&gt;&lt;P&gt;- codeart = codemp&lt;/P&gt;&lt;P&gt;- codesart = codesmp&lt;/P&gt;&lt;P&gt;if typeart = 'P'&lt;/P&gt;&lt;P&gt;- codeart = codprod&lt;/P&gt;&lt;P&gt;- codesart = codsprod.&lt;/P&gt;&lt;P&gt;I need also to keep INOUT table as one table and not 2 seperate tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an other way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 07:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10718#M774590</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-05-10T07:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10719#M774591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have two main tables SOURS_PRODUIT and INOUT. What is the relationship between the two tables? Please, take away synthetic keys in your mind at this time. We need to properly identify the associative keys before handling the synthetic keys.&amp;nbsp;&amp;nbsp; Sorry, passing you through this approach. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 12:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10719#M774591</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2018-05-10T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10720#M774592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The INOUT Table is the fact Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUS_PRODUIT is a dimension Table: It contains the codes and the labels of products. each entry of this Table contains: 4 codes of the product and its label.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The INOUT table has only 2 fields codes for each product but there's an other field named TYPEART and depending on the value of this field we associate a couple of product codes in the SOUS_PRODUIT Table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 13:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10720#M774592</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-05-10T13:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10721#M774593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a little bit tricky.&amp;nbsp; Please, correct me if I am wrong with the following assumptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In your fact table, transaction where TYPEART = 'P'&amp;nbsp; has a product label WHEN CODEART &amp;amp;'-'&amp;amp;CODESART = CODEMP &amp;amp;'_'&amp;amp;CODESMP&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-size: 13.3333px;"&gt;In your fact table, transaction where TYPEART = 'M' has a product label corresponding to the association &lt;SPAN style="font-size: 13.3333px;"&gt;CODEART &amp;amp;'-'&amp;amp;CODESART&amp;nbsp; = &lt;SPAN style="font-size: 13.3333px;"&gt;CODPROD &amp;amp;'_'&amp;amp;CODSPROD&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If the above &lt;SPAN style="font-size: 13.3333px;"&gt;assumptions are&lt;/SPAN&gt; correct, I will perform the following test.&lt;BR /&gt;1. Split the Fact table into two just as you did, but join each table with the product dimension. Return the fields needed eg Product label based on the joining conditions&lt;/P&gt;&lt;P&gt;2. Concatenate the two tables&lt;/P&gt;&lt;P&gt;3. Use Product label as a degenerated dimension instead of product table having its own dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 14:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10721#M774593</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2018-05-10T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10722#M774594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the first assumption is correct just reverse &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;TYPEART = 'P' is for the second assumption and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;TYPEART = 'M' is for the first assumption.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will check that tomorrow and I will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to let you know I generated a composite keys not containg all 4 fields different from 0 I got some results but I didn't finish to test them (because any way I will use TYPEART value, so when all codes in product table are different than zero, I will use either (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;CODEART , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;CODESART) as (CODEMP, CODESMP) or &lt;SPAN style="font-size: 13.3333px;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;CODEART , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;CODESART) as (CODPROD, CODSPROD). When only 2 codes in the composite key are present I got values I am looking for, just I didn't finish my tests.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your time.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Abdallah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 15:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10722#M774594</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-05-10T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10723#M774595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Happy we are heading to the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 12:44:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10723#M774595</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2018-05-11T12:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10724#M774596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jerry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is fixed. I got correct values!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again&lt;/P&gt;&lt;P&gt;Abdallah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 13:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10724#M774596</guid>
      <dc:creator>absekrafi</dc:creator>
      <dc:date>2018-05-14T13:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Composite key</title>
      <link>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10725#M774597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good. Thanks for letting me know. Please, could you close the thread by marking the correct answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 13:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Composite-key/m-p/10725#M774597</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2018-05-14T13:51:03Z</dc:date>
    </item>
  </channel>
</rss>

