<?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 Joining Multiple Keys to Dimension in DataModel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341544#M832878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; 2 fact tables A,B. One table has Customer ID, Account ID and other columns. Second table has only customer ID and other columns.Both were concatenated. Third table is my Customer dimension with which i want to join my fact table.Dimension table has Customer ID, Account ID and other columns. &lt;BR /&gt;Now, my question is&lt;BR /&gt;I want to join my fact table A with dimension table on a combination of Customer ID + Account ID as primary Key. And for table B join my fact with dimension table on Customer ID.&lt;BR /&gt;I'm unable to join as it is leading to the synthetic key. I tried to load dimension table twice and join separately. But entire columns in both dimension tables needs to aliased to avoid synthetic keys which is not my requirement.&lt;BR /&gt;How to avoid synthetic keys and join properly?&lt;BR /&gt;Could anyone help me on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>polisetti</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Joining Multiple Keys to Dimension in DataModel</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341544#M832878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; 2 fact tables A,B. One table has Customer ID, Account ID and other columns. Second table has only customer ID and other columns.Both were concatenated. Third table is my Customer dimension with which i want to join my fact table.Dimension table has Customer ID, Account ID and other columns. &lt;BR /&gt;Now, my question is&lt;BR /&gt;I want to join my fact table A with dimension table on a combination of Customer ID + Account ID as primary Key. And for table B join my fact with dimension table on Customer ID.&lt;BR /&gt;I'm unable to join as it is leading to the synthetic key. I tried to load dimension table twice and join separately. But entire columns in both dimension tables needs to aliased to avoid synthetic keys which is not my requirement.&lt;BR /&gt;How to avoid synthetic keys and join properly?&lt;BR /&gt;Could anyone help me on this?&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/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341544#M832878</guid>
      <dc:creator>polisetti</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Multiple Keys to Dimension in DataModel</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341545#M832879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jaswanath ,&lt;/P&gt;&lt;P&gt;Can you post the graphical image of your model. It will help to understand better.&lt;/P&gt;&lt;P&gt;Well you have one thing have two keys one concatenated one CustID+AccountID for table A and Cust ID for table B.&lt;/P&gt;&lt;P&gt;Butter there can be many issues like circular loop and synthetic keys. You need to avoid them. Well I will recommend two table fact A and fact B both are not connected. Use dimension table to connect them hence from A to dimension table it is combined key and for dimension table to fact table A it is cust ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341545#M832879</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2017-06-09T12:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Multiple Keys to Dimension in DataModel</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341546#M832880</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;This is a small example code of merging two fields ID1 and ID2 into a common key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #999999;"&gt;//create source tables.&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RecNo() as ID1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RecNo()+1 as ID2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Div(Rand()*1000, 1) as Value11,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chr(RecNo()+70) as Value12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 50;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #999999;"&gt;//Add a key field to Table1&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD*,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID1&amp;amp;'|'&amp;amp;ID2 as Key&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RecNo()+10 as ID1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RecNo()+11 as ID2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Div(Rand()*1000, 1) as Value21,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chr(RecNo()+80) as Value22&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 50;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;&lt;STRONG&gt;//Add a key field to Table2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD*,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID1&amp;amp;'|'&amp;amp;ID2 as Key&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;&lt;STRONG&gt;//Remove the synthetic key. Create key table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;KeyTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load Distinct&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key as TempKey,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID1, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate (Table1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load Distinct&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID1, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Not Exists(TempKey, Key);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Drop Field ID1, ID2, TempKey;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can do not delete fields ID1 and ID2, if their further use is expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:56:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-Multiple-Keys-to-Dimension-in-DataModel/m-p/1341546#M832880</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-06-09T13:56:06Z</dc:date>
    </item>
  </channel>
</rss>

