<?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: explicitly assigning foreign key for a table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569978#M1107040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to determine which of the DateKeys in the 2nd table matches the DimDate table datekey, then (for example) in the Fact table load statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ShipDateKey AS DateKey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2014 10:46:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-13T10:46:02Z</dc:date>
    <item>
      <title>explicitly assigning foreign key for a table?</title>
      <link>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569976#M1107038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a table called 'DimDate' table. In this table, 'DateKey' acts as an ID column and remaining are other additional columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="150" style="border: 1px solid rgb(0, 0, 0); width: 106px; height: 122px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;DimDate&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: left;"&gt;&lt;STRONG&gt;Datekey&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Month&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Day&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Year&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Time&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is another table called 'FactSales' table. As we see, there are three columns, ShipDateKey, OrderDateKey, and DueDateKey, which are supposed to be the 'DateKey' from the DimDate table as above..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="175" style="border: 1px solid rgb(0, 0, 0); width: 141px; height: 147px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FactSales&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;FactSalesID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ShipDateKey&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;OrderDateKey&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DueDateKey&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product ID&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview is not recognizing this association as the column names in the FactSales table are different from the one in the DimDate table for Key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we get this association done right?&amp;nbsp; Is it possible to achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please kindly guide me.&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, 13 Mar 2014 10:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569976#M1107038</guid>
      <dc:creator />
      <dc:date>2014-03-13T10:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: explicitly assigning foreign key for a table?</title>
      <link>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569977#M1107039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pramod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can rename 'ShipDateKey' as DateKey&amp;nbsp; while calling FactSales Table. Similarly, you can do with OrderDateKey or DueDateKey&amp;nbsp; depending upon you requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569977#M1107039</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2014-03-13T10:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: explicitly assigning foreign key for a table?</title>
      <link>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569978#M1107040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to determine which of the DateKeys in the 2nd table matches the DimDate table datekey, then (for example) in the Fact table load statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ShipDateKey AS DateKey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569978#M1107040</guid>
      <dc:creator />
      <dc:date>2014-03-13T10:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: explicitly assigning foreign key for a table?</title>
      <link>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569979#M1107041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to join the Dimension table three time to find the respective date. First load the facttable and then load dimension table like Datekey as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ShipDateKey&lt;/SPAN&gt;, date as Shipdate. And&amp;nbsp; load the dimension table again like Datekey as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OrderDateKey&lt;/SPAN&gt;, date as Ordrdate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/explicitly-assigning-foreign-key-for-a-table/m-p/569979#M1107041</guid>
      <dc:creator />
      <dc:date>2014-03-13T10:48:14Z</dc:date>
    </item>
  </channel>
</rss>

