<?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: Pick rows in left table only when it is not present in the right table and vice versa in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816567#M66837</link>
    <description>&lt;P&gt;Hi, Michael shows ASIA:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JuanGerardo_1-1624279351659.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57171i690EA39C82BBBF46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JuanGerardo_1-1624279351659.png" alt="JuanGerardo_1-1624279351659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the test code I have used:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TableAmericas:
Load
	UserName,
	EmptyIsNull(Tag)	AS Tag    
Inline [
UserName,Tag
Michael,ASIA
Mark,Europe
Tim,
];

TableEurope:
NoConcatenate
Load
	UserName,
	EmptyIsNull(Tag)	AS Tag    
Inline [
UserName,Tag
Andrew,US
Tim,Asia
];


TableJoin:
Load
   UserName,
   Tag AS A_Tag
Resident TableAmericas;
Outer Join
Load
   UserName,
   Tag AS E_Tag
Resident TableEurope;

TableWorld:
NoConcatenate Load
   UserName,
   Coalesce(A_Tag, E_Tag, 'Empty') AS Tag
Resident TableJoin;

Drop Tables TableEurope, TableAmericas, TableJoin;&lt;/LI-CODE&gt;&lt;P&gt;As you can see, I have used EmtyIsNull() function to be sure blank values are interpreted as Nulls (for example with Tim in TableAmericas). Maybe you have blanks and not nulls in your tables, and this is the reason Coalesce is not working as you expected, as it needs null values to omit.&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jun 2021 12:46:15 GMT</pubDate>
    <dc:creator>JuanGerardo</dc:creator>
    <dc:date>2021-06-21T12:46:15Z</dc:date>
    <item>
      <title>Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1814959#M66656</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have an requirement like this. Say I have 2 tables&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table - Americas&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;User name&amp;nbsp; &amp;nbsp; Tag&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ASIA&lt;/P&gt;&lt;P&gt;Mark&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Europe&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table - Europe&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;User Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tag&lt;/P&gt;&lt;P&gt;Andrew&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; US&lt;/P&gt;&lt;P&gt;Tim&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;I would like to have the final table as below.&lt;/P&gt;&lt;P&gt;If there is data for an user from "Table - Americas", pick the data from there otherwise, pick from "Table - Europe"&lt;/P&gt;&lt;P&gt;User Name&amp;nbsp; &amp;nbsp; &amp;nbsp; Tag&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;Andrew&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; US&lt;/P&gt;&lt;P&gt;Tim&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;A simple left join would not work.&lt;/P&gt;&lt;P&gt;How can I accomplish this, any ideas will be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1814959#M66656</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-14T15:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1814989#M66658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/138713"&gt;@jpjust&lt;/a&gt;, I think a possible solution could be through outer join:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TableJoin:
Load
   UserName,
   Tag AS A_Tag
Resident TableAmericas;
Outer Join
Load
   UserName,
   Tag AS E_Tag
Resident TableEurope;

TableWorld:
NoConcatenate Load
   UserName,
   Coalesce(A_Tag, E_Tag, 'Empty') AS Tag
Resident TableTMP;

Drop Tables TableEurope, TableAmericas, TableJoin;&lt;/LI-CODE&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 17:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1814989#M66658</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-14T17:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1815337#M66705</link>
      <description>&lt;P&gt;Thanks Juan, that worked.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 21:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1815337#M66705</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-15T21:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816200#M66786</link>
      <description>&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;One scenario popup when I was implementing the logic and testing.&lt;/P&gt;&lt;P&gt;Here are the tables again&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table - Americas&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;User name&amp;nbsp; &amp;nbsp; Tag&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ASIA&lt;/P&gt;&lt;P&gt;Mark&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Europe&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table - Europe&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;User Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tag&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;US&lt;/P&gt;&lt;P&gt;Andrew&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; US&lt;/P&gt;&lt;P&gt;Tim&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;If there is data for an user from "Table - Americas", pick the data from there otherwise, pick from "Table - Europe"&lt;/P&gt;&lt;P&gt;The additional condition is, if the data for user is available on both&amp;nbsp;"Table - Americas" and&amp;nbsp;"Table - Europe", pick the data from&amp;nbsp;"Table - Americas". In that case the final out put should be below. (eg., Michael should show Asia and not US)&lt;/P&gt;&lt;P&gt;User Name&amp;nbsp; &amp;nbsp; &amp;nbsp; Tag&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;Andrew&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; US&lt;/P&gt;&lt;P&gt;Tim&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;How can I achieve this? Any help will be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 19:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816200#M66786</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-18T19:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816478#M66829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/138713"&gt;@jpjust&lt;/a&gt;, your logic is still the same and can also be interpreted as:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If there is any value in table Americas (independently if there is a value in table Europe), get from Americas.&lt;/LI&gt;&lt;LI&gt;If not, get from table Europe.&lt;/LI&gt;&lt;LI&gt;If not, pick the 'Empty' value.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This is accomplished by using Coalesce() function, and the previous code should be valid.&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 09:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816478#M66829</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-21T09:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816550#M66834</link>
      <description>&lt;P&gt;Thank you Juan for the comments.&lt;/P&gt;&lt;P&gt;I would expect such results using&amp;nbsp;&lt;SPAN&gt;Coalesce() function but&amp;nbsp;&lt;/SPAN&gt;unfortunately for Michael, it comes blank.&lt;/P&gt;&lt;P&gt;Any other thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 12:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816550#M66834</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-21T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816567#M66837</link>
      <description>&lt;P&gt;Hi, Michael shows ASIA:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JuanGerardo_1-1624279351659.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57171i690EA39C82BBBF46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JuanGerardo_1-1624279351659.png" alt="JuanGerardo_1-1624279351659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the test code I have used:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TableAmericas:
Load
	UserName,
	EmptyIsNull(Tag)	AS Tag    
Inline [
UserName,Tag
Michael,ASIA
Mark,Europe
Tim,
];

TableEurope:
NoConcatenate
Load
	UserName,
	EmptyIsNull(Tag)	AS Tag    
Inline [
UserName,Tag
Andrew,US
Tim,Asia
];


TableJoin:
Load
   UserName,
   Tag AS A_Tag
Resident TableAmericas;
Outer Join
Load
   UserName,
   Tag AS E_Tag
Resident TableEurope;

TableWorld:
NoConcatenate Load
   UserName,
   Coalesce(A_Tag, E_Tag, 'Empty') AS Tag
Resident TableJoin;

Drop Tables TableEurope, TableAmericas, TableJoin;&lt;/LI-CODE&gt;&lt;P&gt;As you can see, I have used EmtyIsNull() function to be sure blank values are interpreted as Nulls (for example with Tim in TableAmericas). Maybe you have blanks and not nulls in your tables, and this is the reason Coalesce is not working as you expected, as it needs null values to omit.&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 12:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816567#M66837</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-21T12:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816644#M66847</link>
      <description>&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;Really appreciate your efforts.&lt;/P&gt;&lt;P&gt;So here is my data for an user after the outerjoin:&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;"userId" ,&lt;BR /&gt;EmptyIsNull(TagLocationNA) as TagLocationNA ,&lt;BR /&gt;RESIDENT THE_TAGS;&lt;/P&gt;&lt;P&gt;outer Join&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;userId,&lt;BR /&gt;EmptyIsNull(TagLocation) as TagLocationEU,&lt;BR /&gt;RESIDENT EUTags;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jpjust_0-1624288474123.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57187i6E41B1D940C2EB7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jpjust_0-1624288474123.png" alt="jpjust_0-1624288474123.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my final table. If you see both the values shows up from NA and EU and&amp;nbsp;Coalesce function isn't taking the effect.&lt;/P&gt;&lt;P&gt;TableALL:&lt;BR /&gt;NoConcatenate Load&lt;BR /&gt;userId,&lt;BR /&gt;Coalesce(TagLocationNA,TagLocationEU,'Empty')AS TagLocation&lt;BR /&gt;RESIDENT FinalTable;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jpjust_1-1624289051383.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57188iF00F24FE43E8AD1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jpjust_1-1624289051383.png" alt="jpjust_1-1624289051383.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Am I missing some thing here?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816644#M66847</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-21T15:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816696#M66851</link>
      <description>&lt;P&gt;Hi, you are using a final table with records not joined but concatenated, this is the reason why you have 3 rows for that user.&lt;/P&gt;&lt;P&gt;If you have that table, you can use a grouping clause to have one record by user, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TableALL:
NoConcatenate Load
userId,
Coalesce(MaxString(TagLocationNA),MaxString(TagLocationEU),'Empty')AS TagLocation
RESIDENT FinalTable
Group by userId;&lt;/LI-CODE&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 17:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816696#M66851</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-21T17:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Pick rows in left table only when it is not present in the right table and vice versa</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816716#M66852</link>
      <description>&lt;P&gt;Thank you Juan so much and appreciate your help! That really worked great!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 18:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-rows-in-left-table-only-when-it-is-not-present-in-the-right/m-p/1816716#M66852</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2021-06-21T18:54:23Z</dc:date>
    </item>
  </channel>
</rss>

