<?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 Join problem! in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1684144#M52109</link>
    <description>&lt;P&gt;Hi community!,&lt;/P&gt;&lt;P&gt;I have a (small) modeling issue I wanted to ask your help for.&lt;/P&gt;&lt;P&gt;I want to achieve&amp;nbsp;&lt;SPAN&gt;the _Used? flag column below in my model:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="table.PNG" style="width: 293px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29952iC2730A872ED97CCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.PNG" alt="table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I already have the Local Product ID column and Global Product ID in the same table.&lt;BR /&gt;Local Products and Global Products share many relationships between then, and there is a specific relationship I want to flag as (non)existing for each Local Product ID &amp;amp; Global Product ID: the 'Used' relationship.&lt;/P&gt;&lt;P&gt;So, &lt;STRONG&gt;for each row&lt;/STRONG&gt;, I want to have the _Used? flag with 0 or 1: 0 means the relationship doesn't exist; 1 means it does.&lt;/P&gt;&lt;P&gt;I have a Relationships table that tells me the relationships they share, but I don't know how to join these tables to achieve the _Used? flag.&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOCONCATENATE
Relationships:
%ID_Relationship_Local_Product
%ID_Relationship_Global_Product,
Relationship_Type,
...
...
FROM MyRelationshipsTable.QVD
(qvd);


NOCONCATENATE
LocalGlobalProduct:
LOAD
%ID_Relationship_Local_Product
%ID_Global_Product,
Local_Product_Name,
Global_Product_Name,
...
...
FROM MyProductTable.QVD
(qvd);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These two tables are linked by %ID_Relationship_Local_Product (or shouldn't be?).&lt;/P&gt;&lt;P&gt;To come up with the _Used? flag, I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LEFT JOIN(LocalGlobalProduct)

LOAD
%ID_Relationship_Local_Product,
IF(ISNULL(ApplyMap('MapUsedRelationshipBetweenLocalAndGlobalProduct',%ID_Relationship_Local_Product,NULL())),'0','1') AS _Used?
RESIDENT LocalGlobalProduct;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The mapping &lt;STRONG&gt;'MapUsedRelationshipBetweenLocalAndGlobalProduct'&lt;/STRONG&gt; derives from the Relationships table (given the Local Product iID, it tells me the Global Product it uses).&lt;/P&gt;&lt;P&gt;But this solution doesn't work, as it is putting '1' for every global product, not just for the ones where the relationship exists. And the '0' doesn't work as well.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Thank you!,&lt;BR /&gt;Lisa&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:00:06 GMT</pubDate>
    <dc:creator>valpassos</dc:creator>
    <dc:date>2024-11-16T03:00:06Z</dc:date>
    <item>
      <title>Join problem!</title>
      <link>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1684144#M52109</link>
      <description>&lt;P&gt;Hi community!,&lt;/P&gt;&lt;P&gt;I have a (small) modeling issue I wanted to ask your help for.&lt;/P&gt;&lt;P&gt;I want to achieve&amp;nbsp;&lt;SPAN&gt;the _Used? flag column below in my model:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="table.PNG" style="width: 293px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29952iC2730A872ED97CCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.PNG" alt="table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I already have the Local Product ID column and Global Product ID in the same table.&lt;BR /&gt;Local Products and Global Products share many relationships between then, and there is a specific relationship I want to flag as (non)existing for each Local Product ID &amp;amp; Global Product ID: the 'Used' relationship.&lt;/P&gt;&lt;P&gt;So, &lt;STRONG&gt;for each row&lt;/STRONG&gt;, I want to have the _Used? flag with 0 or 1: 0 means the relationship doesn't exist; 1 means it does.&lt;/P&gt;&lt;P&gt;I have a Relationships table that tells me the relationships they share, but I don't know how to join these tables to achieve the _Used? flag.&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOCONCATENATE
Relationships:
%ID_Relationship_Local_Product
%ID_Relationship_Global_Product,
Relationship_Type,
...
...
FROM MyRelationshipsTable.QVD
(qvd);


NOCONCATENATE
LocalGlobalProduct:
LOAD
%ID_Relationship_Local_Product
%ID_Global_Product,
Local_Product_Name,
Global_Product_Name,
...
...
FROM MyProductTable.QVD
(qvd);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These two tables are linked by %ID_Relationship_Local_Product (or shouldn't be?).&lt;/P&gt;&lt;P&gt;To come up with the _Used? flag, I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LEFT JOIN(LocalGlobalProduct)

LOAD
%ID_Relationship_Local_Product,
IF(ISNULL(ApplyMap('MapUsedRelationshipBetweenLocalAndGlobalProduct',%ID_Relationship_Local_Product,NULL())),'0','1') AS _Used?
RESIDENT LocalGlobalProduct;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The mapping &lt;STRONG&gt;'MapUsedRelationshipBetweenLocalAndGlobalProduct'&lt;/STRONG&gt; derives from the Relationships table (given the Local Product iID, it tells me the Global Product it uses).&lt;/P&gt;&lt;P&gt;But this solution doesn't work, as it is putting '1' for every global product, not just for the ones where the relationship exists. And the '0' doesn't work as well.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Thank you!,&lt;BR /&gt;Lisa&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1684144#M52109</guid>
      <dc:creator>valpassos</dc:creator>
      <dc:date>2024-11-16T03:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Join problem!</title>
      <link>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1684266#M52114</link>
      <description>&lt;P&gt;Not a hint?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 19:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1684266#M52114</guid>
      <dc:creator>valpassos</dc:creator>
      <dc:date>2020-03-12T19:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Join problem!</title>
      <link>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1687236#M52350</link>
      <description>&lt;P&gt;Fixed&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 09:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join-problem/m-p/1687236#M52350</guid>
      <dc:creator>valpassos</dc:creator>
      <dc:date>2020-03-24T09:45:12Z</dc:date>
    </item>
  </channel>
</rss>

