<?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: Building Link table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521925#M106611</link>
    <description>&lt;P&gt;instead of concatenating the distinct values of the tables, make a full outer join instead, this way customer and product and year may fit in a common row for the 3 fact tables&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2025 07:21:05 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2025-06-23T07:21:05Z</dc:date>
    <item>
      <title>Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521892#M106608</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;lets say I have 3 fact tables F1,F2,F3&amp;nbsp;&lt;/P&gt;&lt;P&gt;F1 and F3 have common dimensions Year, Product, Customer&lt;/P&gt;&lt;P&gt;F2 have common dimensions Year, Product&lt;/P&gt;&lt;P&gt;I want implicit association so when a customer is selected, I want rows in F2 to be selected if the Year, Product exists in F2 for that customer in F1,F3&lt;/P&gt;&lt;P&gt;So I build a link table like below "L" and I have the F1-F3 tables and a couple dimensions tables&lt;/P&gt;&lt;P&gt;Now there is a many-to-one relationship between the "L" table and the "F2" table because of the "Fact2CompositeKey" field. Can this be a problem? Is the Link table wrong? I did some tests and didn't find any issue.&lt;/P&gt;&lt;P&gt;I can make the Fact2CompositeKey unique in the "L" table by not adding keys that already exists but that defeats the purpose, for instance, if a row gets added in the F3 table with Year=2023, Product=4, Customer=D I want this row associated with the F2 table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another way to build the Link table in this case?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik_William_0-1750577019924.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/181517i8656853F328D6AAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Qlik_William_0-1750577019924.png" alt="Qlik_William_0-1750577019924.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2025 07:33:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521892#M106608</guid>
      <dc:creator>Qlik_William</dc:creator>
      <dc:date>2025-06-22T07:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521893#M106609</link>
      <description>&lt;P&gt;I think i solved it by building the link table first, loading the 2 fact tables with all 3 common dimensions first, and for the last fact table F2 using this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WHERE NOT Exists(Fact2CompositeKey,Year &amp;amp; '|' &amp;amp; Product)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkTable:&lt;BR /&gt;LOAD&lt;BR /&gt;Distinct&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product &amp;amp; '|' &amp;amp; Customer as Fact13CompositeKey,&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product as Fact2CompositeKey,&lt;BR /&gt;Year,&lt;BR /&gt;Product,&lt;BR /&gt;Customer&lt;BR /&gt;FROM [lib://Excel_Data/Link_Examples.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Fact1);&lt;/P&gt;&lt;P&gt;Concatenate(LinkTable)&lt;BR /&gt;LOAD&lt;BR /&gt;Distinct&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product &amp;amp; '|' &amp;amp; Customer as Fact13CompositeKey,&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product as Fact2CompositeKey,&lt;BR /&gt;Year,&lt;BR /&gt;Product,&lt;BR /&gt;Customer&lt;BR /&gt;FROM [lib://Excel_Data/Link_Examples.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Fact3);&lt;/P&gt;&lt;P&gt;Concatenate(LinkTable)&lt;BR /&gt;LOAD&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product &amp;amp; '|' &amp;amp; null() as Fact13CompositeKey,&lt;BR /&gt;Year &amp;amp; '|' &amp;amp; Product as Fact2CompositeKey,&lt;BR /&gt;Year,&lt;BR /&gt;Product&lt;BR /&gt;FROM [lib://Excel_Data/Link_Examples.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Fact2)&lt;BR /&gt;WHERE NOT Exists(Fact2CompositeKey,Year &amp;amp; '|' &amp;amp; Product)&lt;BR /&gt;;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2025 09:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521893#M106609</guid>
      <dc:creator>Qlik_William</dc:creator>
      <dc:date>2025-06-22T09:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521925#M106611</link>
      <description>&lt;P&gt;instead of concatenating the distinct values of the tables, make a full outer join instead, this way customer and product and year may fit in a common row for the 3 fact tables&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521925#M106611</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2025-06-23T07:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521947#M106614</link>
      <description>&lt;P&gt;Like hinted in my comment to your previous posting a link-table approach must not be the most suitable data-model - neither from any performance point of view nor to the needed extra efforts.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 10:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521947#M106614</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-06-23T10:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521952#M106616</link>
      <description>&lt;P&gt;You mean by using Join(LinkTable) instead of Concatenate(LinkTable) keeping the rest of the script the same? It produces the same result in my test. Also maybe joining tables like this will increase script run time, not sure though. Thanks for your comment&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 11:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521952#M106616</guid>
      <dc:creator>Qlik_William</dc:creator>
      <dc:date>2025-06-23T11:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521954#M106618</link>
      <description>&lt;P&gt;Yes I am aware, just trying some different things. Is there a way to build the link table in my example without replicating the &lt;SPAN&gt;Fact2CompositeKey&amp;nbsp;do you know?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my second comment using the&amp;nbsp;WHERE NOT Exists(Fact2CompositeKey,Year &amp;amp; '|' &amp;amp; Product)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can still get duplicates for&amp;nbsp;Fact2CompositeKey in the Link table from F3, for instance if F3 contains a row Year=2023, Product=2, Customer=D. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then I will have&amp;nbsp;Fact2CompositeKey 2023|2 repeated twice in Link table. So when I select Product=2 two rows will be associated with the F2 table. Not sure if it's a problem though.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 11:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521954#M106618</guid>
      <dc:creator>Qlik_William</dc:creator>
      <dc:date>2025-06-23T11:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521968#M106621</link>
      <description>&lt;P&gt;I think it's the wrong logic/load-order to build at first the link-table and then the facts because at this point it's completely unknown which key-values exists or not.&lt;/P&gt;&lt;P&gt;There are a lot of good reasons to check the (not only by the key's) values to clear/remove, correct and/or fill/populate them before creating the final tables - regardless if a star-scheme or a link-table data-model is used.&lt;/P&gt;&lt;P&gt;The last where not exists() concatenate tries to fill two keys at the same time. To ensure that all adding/population is working as expected all steps should be done explicitly.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 13:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521968#M106621</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-06-23T13:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Building Link table</title>
      <link>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521976#M106623</link>
      <description>&lt;P&gt;yes use&amp;nbsp;&lt;BR /&gt;Linktable:&lt;BR /&gt;load * from F1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Outer Join(Linktable)&lt;BR /&gt;load distinct common_key from F2;&lt;BR /&gt;&lt;BR /&gt;outer join (LinkTable)&lt;BR /&gt;load distinct common_keys from F3;&lt;BR /&gt;&lt;BR /&gt;this case you eliminated duplicates&lt;BR /&gt;and you would have common columns in same rows instead of having ones for F1, and F2 and another for F3&lt;BR /&gt;&lt;BR /&gt;reload time increase depends on the size of each fact table&lt;BR /&gt;but usually it doesn't take so much time because you will be loading only the common columns for the linktable&lt;BR /&gt;&lt;BR /&gt;You may optimize the load as follows:&lt;BR /&gt;outer join(LinkTable)&lt;BR /&gt;load key1, key2;&lt;BR /&gt;load * from F2.qvd(qvd);&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 13:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Building-Link-table/m-p/2521976#M106623</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2025-06-23T13:48:45Z</dc:date>
    </item>
  </channel>
</rss>

