<?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: Multiple Left Join on the same table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610761#M736417</link>
    <description>&lt;P&gt;I think it won't be possible with one step but with some additionally work like:&lt;/P&gt;&lt;P&gt;t1: load PK_CHAT, X from table1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; left join&lt;BR /&gt;load PK_CHAT, concat(Y, ',') as Y, count(Y) as Ycount from table2 group by PK_CHAT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; left join&lt;BR /&gt;load PK_CHAT, Z from table3;&lt;/P&gt;&lt;P&gt;t2: load PK_CHAT, X, if(Ycount = 1, Y, subfield(Y, ',', iterno())) as Y, if(iterno()=1, Z) as Z&lt;BR /&gt;resident t1 while iterno() &amp;lt;= substringcount(Y, ',') + 1&lt;/P&gt;&lt;P&gt;you could create such a data-structure.&lt;/P&gt;&lt;P&gt;But there might be better approaches than that, for example you just associate these tables within the datamodel without any merging (maybe only partly) or you concatenate them.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2019 15:12:53 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-08-08T15:12:53Z</dc:date>
    <item>
      <title>Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610553#M736415</link>
      <description>&lt;P&gt;Hello everyone, I have been struggeling for a few hours now on a left join problem and i´d like your help.&lt;/P&gt;&lt;P&gt;I have 3 tables sharing a key called PK_CHAT (I am using chatbots data)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The first table table 1 only have one row per PK_CHAT&lt;/LI&gt;&lt;LI&gt;The second one table 2 can have multilpe rows per PK_CHAT&lt;/LI&gt;&lt;LI&gt;The third one&amp;nbsp; table 3 can have multilpe rows per PK_CHAT&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to do 2 left join using&amp;nbsp; table 1 as my master table and link table 1 to table 2 and table 1 to table 3. However I don´t want table 2 and table 3 to be directly related. Let me explain with an example.&lt;/P&gt;&lt;P&gt;Table 1&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PK_CHAT&lt;/TD&gt;&lt;TD&gt;Variable X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PK_CHAT&lt;/TD&gt;&lt;TD&gt;Variable Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Table 3&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PK_CHAT&lt;/TD&gt;&lt;TD&gt;Variable Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´d like the result to be&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PK_CHAT&lt;/TD&gt;&lt;TD&gt;Variable X&lt;/TD&gt;&lt;TD&gt;Variable Y&lt;/TD&gt;&lt;TD&gt;Variable Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get the following result doing two left join in qlikse &amp;gt;&amp;gt; Left join (table 1) LOAD ....&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PK_CHAT&lt;/TD&gt;&lt;TD&gt;Variable X&lt;/TD&gt;&lt;TD&gt;Variable Y&lt;/TD&gt;&lt;TD&gt;Variable Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PK 1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know if my problem has a solution or should I try to find another data structure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610553#M736415</guid>
      <dc:creator>mdujardi</dc:creator>
      <dc:date>2024-11-16T02:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610567#M736416</link>
      <description>&lt;P&gt;instead of left join try to use concat&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 09:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610567#M736416</guid>
      <dc:creator>miskinmaz</dc:creator>
      <dc:date>2019-08-08T09:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610761#M736417</link>
      <description>&lt;P&gt;I think it won't be possible with one step but with some additionally work like:&lt;/P&gt;&lt;P&gt;t1: load PK_CHAT, X from table1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; left join&lt;BR /&gt;load PK_CHAT, concat(Y, ',') as Y, count(Y) as Ycount from table2 group by PK_CHAT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; left join&lt;BR /&gt;load PK_CHAT, Z from table3;&lt;/P&gt;&lt;P&gt;t2: load PK_CHAT, X, if(Ycount = 1, Y, subfield(Y, ',', iterno())) as Y, if(iterno()=1, Z) as Z&lt;BR /&gt;resident t1 while iterno() &amp;lt;= substringcount(Y, ',') + 1&lt;/P&gt;&lt;P&gt;you could create such a data-structure.&lt;/P&gt;&lt;P&gt;But there might be better approaches than that, for example you just associate these tables within the datamodel without any merging (maybe only partly) or you concatenate them.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 15:12:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1610761#M736417</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-08-08T15:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611828#M736418</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Miskinmaz, thank you. I had a look at concatenate but they say "&lt;SPAN&gt;Concatenate is very helpful when you have to include 2 or more Fact tables in your data model. These Fact tables should be of same granularity" . In my case I don´t have the same data structure for the 2 tables &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 06:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611828#M736418</guid>
      <dc:creator>mdujardi</dc:creator>
      <dc:date>2019-08-13T06:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611830#M736419</link>
      <description>&lt;P&gt;Hi Marcus, thank you. really smart code but as you said it´s start to be too complicated. I should develop another approach. I think I will load them separately.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 07:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611830#M736419</guid>
      <dc:creator>mdujardi</dc:creator>
      <dc:date>2019-08-13T07:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611846#M736420</link>
      <description>&lt;P&gt;Asynchronous concatenated tables and/or tables which contain data with a different granularity are possible and work often very well. Beside this it's usually much more easier to develop a datamodel with this approach as all other ways - therefore you shouldn't discard it too fast.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 07:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611846#M736420</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-08-13T07:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Left Join on the same table</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611854#M736421</link>
      <description>&lt;P&gt;Ok Marcus, I' ll have a look today!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 07:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Left-Join-on-the-same-table/m-p/1611854#M736421</guid>
      <dc:creator>mdujardi</dc:creator>
      <dc:date>2019-08-13T07:44:29Z</dc:date>
    </item>
  </channel>
</rss>

