<?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 Explain : more records after left join in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Explain-more-records-after-left-join/m-p/1805671#M65508</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;please kindly explain why I am getting more records after left join , below I provided the script as well.&lt;/P&gt;&lt;P&gt;Amber Care table got : 434 records and dim facility got :22 records but Amber care Final table has : 9548 .. Any help ...pls kindly explain what I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="res.PNG" style="width: 457px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54405i727F3D931AC3D91E/image-size/large?v=v2&amp;amp;px=999" role="button" title="res.PNG" alt="res.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;script :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Amber Care]&lt;/STRONG&gt;:&lt;BR /&gt;LOAD&lt;BR /&gt;FACILITY,&lt;BR /&gt;If(FACILITY like '*Ho*', 'Ho',&lt;BR /&gt;If(FACILITY like '*Ro*', 'R',&lt;BR /&gt;If(FACILITY like '*Ry*', 'Ry',&lt;BR /&gt;If(FACILITY like '*Green*', 'Green',&lt;BR /&gt;If(FACILITY like '*Mo*', 'Mo',&lt;BR /&gt;If(FACILITY like '*Ne*', 'Ne','FACILITY')))))) as facility_name,&lt;BR /&gt;MRN&lt;BR /&gt;FROM [lib://AttachedFiles/Data.xlsx]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;left join ([Amber Care])&lt;BR /&gt;LOAD "facility_identifier" ,&lt;BR /&gt;facility_name&lt;BR /&gt;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "view";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;[Amber Care Final]:&lt;BR /&gt;Load "facility_identifier" &amp;amp; '-' &amp;amp; "VISIT_ID" as VISITID,&lt;BR /&gt;*&lt;BR /&gt;Resident [Amber Care];&lt;/P&gt;&lt;P&gt;Drop Table [Amber Care];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 03:29:38 GMT</pubDate>
    <dc:creator>ashmitp869</dc:creator>
    <dc:date>2021-05-06T03:29:38Z</dc:date>
    <item>
      <title>Explain : more records after left join</title>
      <link>https://community.qlik.com/t5/App-Development/Explain-more-records-after-left-join/m-p/1805671#M65508</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;please kindly explain why I am getting more records after left join , below I provided the script as well.&lt;/P&gt;&lt;P&gt;Amber Care table got : 434 records and dim facility got :22 records but Amber care Final table has : 9548 .. Any help ...pls kindly explain what I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="res.PNG" style="width: 457px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54405i727F3D931AC3D91E/image-size/large?v=v2&amp;amp;px=999" role="button" title="res.PNG" alt="res.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;script :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Amber Care]&lt;/STRONG&gt;:&lt;BR /&gt;LOAD&lt;BR /&gt;FACILITY,&lt;BR /&gt;If(FACILITY like '*Ho*', 'Ho',&lt;BR /&gt;If(FACILITY like '*Ro*', 'R',&lt;BR /&gt;If(FACILITY like '*Ry*', 'Ry',&lt;BR /&gt;If(FACILITY like '*Green*', 'Green',&lt;BR /&gt;If(FACILITY like '*Mo*', 'Mo',&lt;BR /&gt;If(FACILITY like '*Ne*', 'Ne','FACILITY')))))) as facility_name,&lt;BR /&gt;MRN&lt;BR /&gt;FROM [lib://AttachedFiles/Data.xlsx]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;left join ([Amber Care])&lt;BR /&gt;LOAD "facility_identifier" ,&lt;BR /&gt;facility_name&lt;BR /&gt;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "view";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;[Amber Care Final]:&lt;BR /&gt;Load "facility_identifier" &amp;amp; '-' &amp;amp; "VISIT_ID" as VISITID,&lt;BR /&gt;*&lt;BR /&gt;Resident [Amber Care];&lt;/P&gt;&lt;P&gt;Drop Table [Amber Care];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 03:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Explain-more-records-after-left-join/m-p/1805671#M65508</guid>
      <dc:creator>ashmitp869</dc:creator>
      <dc:date>2021-05-06T03:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Explain : more records after left join</title>
      <link>https://community.qlik.com/t5/App-Development/Explain-more-records-after-left-join/m-p/1805861#M65535</link>
      <description>&lt;P&gt;It looks like the join is not correct. It joins on facility name and not on a unique ID/Key. Therefore you see that 434 * 22 = 9548 lines. It now joins on all possibilities. If you want to fix this then you should look for a key that is unique enough. Maybe the field "facility_identifier" is the same as "FACILITY" or is &lt;SPAN&gt;facility_name exact the same as&amp;nbsp;facility_name in the first load??&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 14:17:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Explain-more-records-after-left-join/m-p/1805861#M65535</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2021-05-06T14:17:02Z</dc:date>
    </item>
  </channel>
</rss>

