<?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 left join in data model in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785052#M1209946</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have below data model:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614065712110.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49646i541BEBDB7DF513EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614065712110.png" alt="Aspiring_Developer_0-1614065712110.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the script&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD tag_UID,&lt;BR /&gt;tag_Material,&lt;BR /&gt;tag_Mat_Description,&lt;BR /&gt;tag_SkidID,&lt;BR /&gt;tag_LogicalSkidID,&lt;BR /&gt;tag_SkidPosition,&lt;BR /&gt;tag_Version,&lt;BR /&gt;tag_Color,&lt;BR /&gt;tag_Changer,&lt;BR /&gt;tag_ChangeDate,&lt;BR /&gt;tag_TrolleyID,&lt;BR /&gt;tag_Undetected,&lt;BR /&gt;tag_Mold,&lt;BR /&gt;tag_Cavity,&lt;BR /&gt;tag_ProdDate,&lt;BR /&gt;tag_UndetecCount,&lt;BR /&gt;tag_InternalID,&lt;BR /&gt;tag_IMPCCycleNumber,&lt;BR /&gt;tag_IMPCCompliance,&lt;BR /&gt;tag_IMPCCreatedAt,&lt;BR /&gt;tag_QualityStatus&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\admin.vbhardwaj\Desktop\P_Tag_Data.qvd]&lt;BR /&gt;(qvd) where trim(len(tag_Changer))&amp;gt;0 and&lt;BR /&gt;not wildmatch(tag_Changer, 'Undetected_FeragGate1', 'Undetected_FeragGate2','Undetected_FeragGate3', 'Undetected_FeragGate4', 'Undetected_FeragGate5.2' ,'Undetected_FeragGate6', 'Undetected_FeragGate7'&lt;BR /&gt;,'Undetected_FeragGate8') ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//===To create distinct tag_uid===//&lt;BR /&gt;T1:&lt;BR /&gt;Load distinct (tag_UID)&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;//=====To create tag mold==//&lt;/P&gt;&lt;P&gt;left join (T1)&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;Load&lt;BR /&gt;tag_UID,&lt;BR /&gt;Max(tag_ChangeDate) as Max_Datetime_mold&lt;BR /&gt;resident Data&lt;BR /&gt;where tag_Color = 'NULL'&lt;BR /&gt;group by tag_UID&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//===To create tag paint--//&lt;/P&gt;&lt;P&gt;left join (T1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;T3:&lt;BR /&gt;Load tag_UID,&lt;BR /&gt;Max(tag_ChangeDate) as Max_Datetime_paint&lt;BR /&gt;resident Data&lt;BR /&gt;where tag_Color &amp;lt;&amp;gt; 'NULL'&lt;/P&gt;&lt;P&gt;group by tag_UID ;&lt;/P&gt;&lt;P&gt;=======================================&lt;/P&gt;&lt;P&gt;I want to achieve below in qlik&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_1-1614066828731.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49649i861E71D1E0984A94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_1-1614066828731.png" alt="Aspiring_Developer_1-1614066828731.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table T1 (left join) with Data on Tga_uid and&amp;nbsp;Max_Datetime_mold === new table&lt;/P&gt;&lt;P&gt;New table (left join) with T1 on&amp;nbsp;Tga_uid&amp;nbsp; and&amp;nbsp;Max_Datetime_paint&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;Also when i am joining the table i also need to achieve below:-&lt;/P&gt;&lt;P&gt;Table T1 left join Table Data&lt;/P&gt;&lt;P&gt;In table data , there should be field like below:-&lt;/P&gt;&lt;P&gt;tag_TrolleyID as&amp;nbsp;tag_TrolleyID_paint,&lt;/P&gt;&lt;P&gt;And when performing second join, the data table should have the feilds&lt;/P&gt;&lt;P&gt;tag_TrolleyID&amp;nbsp; as&amp;nbsp;tag_TrolleyID_mold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, in the final tabl i should have the above two differen fields in the single table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written another post with some additional information as i am not able to find any solution.&lt;/P&gt;&lt;P&gt;Request you to please help !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 09:48:22 GMT</pubDate>
    <dc:creator>Aspiring_Developer</dc:creator>
    <dc:date>2021-02-23T09:48:22Z</dc:date>
    <item>
      <title>left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785052#M1209946</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have below data model:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614065712110.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49646i541BEBDB7DF513EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614065712110.png" alt="Aspiring_Developer_0-1614065712110.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the script&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD tag_UID,&lt;BR /&gt;tag_Material,&lt;BR /&gt;tag_Mat_Description,&lt;BR /&gt;tag_SkidID,&lt;BR /&gt;tag_LogicalSkidID,&lt;BR /&gt;tag_SkidPosition,&lt;BR /&gt;tag_Version,&lt;BR /&gt;tag_Color,&lt;BR /&gt;tag_Changer,&lt;BR /&gt;tag_ChangeDate,&lt;BR /&gt;tag_TrolleyID,&lt;BR /&gt;tag_Undetected,&lt;BR /&gt;tag_Mold,&lt;BR /&gt;tag_Cavity,&lt;BR /&gt;tag_ProdDate,&lt;BR /&gt;tag_UndetecCount,&lt;BR /&gt;tag_InternalID,&lt;BR /&gt;tag_IMPCCycleNumber,&lt;BR /&gt;tag_IMPCCompliance,&lt;BR /&gt;tag_IMPCCreatedAt,&lt;BR /&gt;tag_QualityStatus&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\admin.vbhardwaj\Desktop\P_Tag_Data.qvd]&lt;BR /&gt;(qvd) where trim(len(tag_Changer))&amp;gt;0 and&lt;BR /&gt;not wildmatch(tag_Changer, 'Undetected_FeragGate1', 'Undetected_FeragGate2','Undetected_FeragGate3', 'Undetected_FeragGate4', 'Undetected_FeragGate5.2' ,'Undetected_FeragGate6', 'Undetected_FeragGate7'&lt;BR /&gt;,'Undetected_FeragGate8') ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//===To create distinct tag_uid===//&lt;BR /&gt;T1:&lt;BR /&gt;Load distinct (tag_UID)&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;//=====To create tag mold==//&lt;/P&gt;&lt;P&gt;left join (T1)&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;Load&lt;BR /&gt;tag_UID,&lt;BR /&gt;Max(tag_ChangeDate) as Max_Datetime_mold&lt;BR /&gt;resident Data&lt;BR /&gt;where tag_Color = 'NULL'&lt;BR /&gt;group by tag_UID&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//===To create tag paint--//&lt;/P&gt;&lt;P&gt;left join (T1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;T3:&lt;BR /&gt;Load tag_UID,&lt;BR /&gt;Max(tag_ChangeDate) as Max_Datetime_paint&lt;BR /&gt;resident Data&lt;BR /&gt;where tag_Color &amp;lt;&amp;gt; 'NULL'&lt;/P&gt;&lt;P&gt;group by tag_UID ;&lt;/P&gt;&lt;P&gt;=======================================&lt;/P&gt;&lt;P&gt;I want to achieve below in qlik&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_1-1614066828731.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49649i861E71D1E0984A94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_1-1614066828731.png" alt="Aspiring_Developer_1-1614066828731.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table T1 (left join) with Data on Tga_uid and&amp;nbsp;Max_Datetime_mold === new table&lt;/P&gt;&lt;P&gt;New table (left join) with T1 on&amp;nbsp;Tga_uid&amp;nbsp; and&amp;nbsp;Max_Datetime_paint&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;Also when i am joining the table i also need to achieve below:-&lt;/P&gt;&lt;P&gt;Table T1 left join Table Data&lt;/P&gt;&lt;P&gt;In table data , there should be field like below:-&lt;/P&gt;&lt;P&gt;tag_TrolleyID as&amp;nbsp;tag_TrolleyID_paint,&lt;/P&gt;&lt;P&gt;And when performing second join, the data table should have the feilds&lt;/P&gt;&lt;P&gt;tag_TrolleyID&amp;nbsp; as&amp;nbsp;tag_TrolleyID_mold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, in the final tabl i should have the above two differen fields in the single table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written another post with some additional information as i am not able to find any solution.&lt;/P&gt;&lt;P&gt;Request you to please help !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 09:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785052#M1209946</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2021-02-23T09:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785268#M1209968</link>
      <description>&lt;P&gt;i would tweak this just a little:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data:
LOAD tag_UID,
tag_Material,
tag_Mat_Description,
tag_SkidID,
tag_LogicalSkidID,
tag_SkidPosition,
tag_Version,
tag_Color,
tag_Changer,
tag_ChangeDate,
tag_TrolleyID,
if(tag_Color = 'NULL', tag_TrolleyID ) as tag_TrolleyID_mold,
if(tag_Color &amp;lt;&amp;gt; 'NULL', tag_TrolleyID ) as tag_TrolleyID_paint,
tag_Undetected,
tag_Mold,
tag_Cavity,
tag_ProdDate,
tag_UndetecCount,
tag_InternalID,
tag_IMPCCycleNumber,
tag_IMPCCompliance,
tag_IMPCCreatedAt,
tag_QualityStatus,
if(tag_Color = 'NULL', tag_ChangeDate) as Datetime_mold,
if(tag_Color &amp;lt;&amp;gt; 'NULL', tag_ChangeDate) as Datetime_paint
FROM
[C:\Users\admin.vbhardwaj\Desktop\P_Tag_Data.qvd]
(qvd) where trim(len(tag_Changer))&amp;gt;0 and
not wildmatch(tag_Changer, 'Undetected_FeragGate1', 'Undetected_FeragGate2','Undetected_FeragGate3', 'Undetected_FeragGate4', 'Undetected_FeragGate5.2' ,'Undetected_FeragGate6', 'Undetected_FeragGate7'
,'Undetected_FeragGate8') ;

 

//===To create distinct tag_uid===//
T1:
Load
tag_UID,
Max(Datetime_mold) as Max_Datetime_mold,
Max(Datetime_paint) as Max_Datetime_paint
resident Data
group by tag_UID
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 13:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785268#M1209968</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-23T13:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785269#M1209969</link>
      <description>&lt;P&gt;you actually dont need to join the tables again as the two tables are already associated by tag_UID.&amp;nbsp; there must be a reason why you want it joined maybe you can explain that&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 13:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785269#M1209969</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-23T13:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785325#M1209977</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for sharing the resiolution as i was struggling to find the soliution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason we need join is to create two tables , because&lt;/P&gt;&lt;P&gt;1) We need to take distinct tag_UID&lt;/P&gt;&lt;P&gt;2) Using the above distinct tag_UID , we have to find max_Datetime_mold where tag_colors =NULL&lt;/P&gt;&lt;P&gt;and Max_Datetime_paint where tag_color &amp;lt;&amp;gt; 'NULL'&lt;/P&gt;&lt;P&gt;The above two operations should be perfomed with distinct tag_uid and then&amp;nbsp;&lt;/P&gt;&lt;P&gt;for final table we join Data table (having all ID's ) and T1&amp;nbsp; table (having distinct Itag_uid's)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End result should be single table having all fields (including Max_Datetime_mold and Max_Datetime_paint) whic you have created in T1 table.&lt;/P&gt;&lt;P&gt;Can you please help ???&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 14:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785325#M1209977</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2021-02-23T14:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785357#M1209981</link>
      <description>&lt;P&gt;if you create a table aggregated /grouped by tag_IUD you will result in a distinct of each.&lt;/P&gt;&lt;P&gt;im saying you dont need to join but if you want, you can inner join again to get a single table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data:
LOAD tag_UID,
tag_Material,
tag_Mat_Description,
tag_SkidID,
tag_LogicalSkidID,
tag_SkidPosition,
tag_Version,
tag_Color,
tag_Changer,
tag_ChangeDate,
tag_TrolleyID,
if(tag_Color = 'NULL', tag_TrolleyID ) as tag_TrolleyID_mold,
if(tag_Color &amp;lt;&amp;gt; 'NULL', tag_TrolleyID ) as tag_TrolleyID_paint,
tag_Undetected,
tag_Mold,
tag_Cavity,
tag_ProdDate,
tag_UndetecCount,
tag_InternalID,
tag_IMPCCycleNumber,
tag_IMPCCompliance,
tag_IMPCCreatedAt,
tag_QualityStatus,
if(tag_Color = 'NULL', tag_ChangeDate) as Datetime_mold,
if(tag_Color &amp;lt;&amp;gt; 'NULL', tag_ChangeDate) as Datetime_paint
FROM
[C:\Users\admin.vbhardwaj\Desktop\P_Tag_Data.qvd]
(qvd) where trim(len(tag_Changer))&amp;gt;0 and
not wildmatch(tag_Changer, 'Undetected_FeragGate1', 'Undetected_FeragGate2','Undetected_FeragGate3', 'Undetected_FeragGate4', 'Undetected_FeragGate5.2' ,'Undetected_FeragGate6', 'Undetected_FeragGate7'
,'Undetected_FeragGate8') ;

 

inner join (Data)
Load
tag_UID,
Max(Datetime_mold) as Max_Datetime_mold,
Max(Datetime_paint) as Max_Datetime_paint
resident Data
group by tag_UID
;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 23 Feb 2021 14:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785357#M1209981</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-23T14:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: left join in data model</title>
      <link>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785695#M1210022</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to achieve below :-&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For the newly created table (in the application it will be another table than the original tag_data table) we should have only one line per part.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also the different join should be done between the tag_uid and the tag_changedate.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 09:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/left-join-in-data-model/m-p/1785695#M1210022</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2021-02-24T09:47:27Z</dc:date>
    </item>
  </channel>
</rss>

