<?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: Need to join two table for creating a derived_field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813865#M66497</link>
    <description>&lt;P&gt;If your country-field from dataset 1 contained a valid delimiter between the multiple entries you could split them into multiple records, for example with:&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;subfield(Country, Delimiter) as Country&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;and on it you could simply join/map the dataset 2 against it.&lt;/P&gt;&lt;P&gt;If there is not such delimiter like it looked in your example because the country-items itself contain spaces and the delimiter seems to be a space it's not working.&lt;/P&gt;&lt;P&gt;In this case you could load the dataset 2 at first within a mapping-table and using mapsubstring() to replace the entries with the regions and/or you replaced them with their own value - but adding a valid delimiter to them. And then you could apply subfield() again like described above.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 09:38:03 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2021-06-09T09:38:03Z</dc:date>
    <item>
      <title>Need to join two table for creating a derived_field</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813590#M66444</link>
      <description>&lt;DIV class="topic-subject-wrapper"&gt;&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;&lt;DIV class="lia-message-subject"&gt;Need to join two tables for creating a derived field&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="MessageInResponseTo lia-component-message-view-widget-in-response-to lia-component-in-response-to"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to joining two tables, but there is no primary key in between them, please find the below scenario and suggest any possible solution.&lt;/P&gt;&lt;P&gt;DataSet1&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SalesOrderID&lt;/TD&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;TD&gt;Order Reference&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;45283&lt;/TD&gt;&lt;TD&gt;2nd Check Opens Cons&lt;/TD&gt;&lt;TD&gt;61145&lt;/TD&gt;&lt;TD&gt;United Arab Emirates Egypt Iraq Iran, Islamic Republic of Jordan Kuwait Lebanon Libya Oman Qatar Saudi Arabia Yemen&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;46042&lt;/TD&gt;&lt;TD&gt;Checking Funded SB&lt;/TD&gt;&lt;TD&gt;6157&lt;/TD&gt;&lt;TD&gt;United Arab Emirates Egypt Iraq Iran&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;46976&lt;/TD&gt;&lt;TD&gt;Savings Open Cons&lt;/TD&gt;&lt;TD&gt;61892&lt;/TD&gt;&lt;TD&gt;Canada Saint Pierre and Miquelon United States&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;47997&lt;/TD&gt;&lt;TD&gt;Savings Funded Cons&lt;/TD&gt;&lt;TD&gt;61953&lt;/TD&gt;&lt;TD&gt;Canada Saint Pierre and Miquelon United States United Arab Emirates Egypt&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DataSet2&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Region&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;United Arab Emirates&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;North America&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Egypt&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Iraq&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Iran, Islamic Republic of&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jordan&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Kuwait&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Lebanon&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Libya&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Oman&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Saint Pierre and Miquelon&lt;/TD&gt;&lt;TD&gt;North America&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Qatar&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Saudi Arabia&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;United States&lt;/TD&gt;&lt;TD&gt;North America&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yemen&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to compare country field in dataset 1 and country field in dataset2 and create new field with region value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output would be :&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SalesOrderID&lt;/TD&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;TD&gt;Order Reference&lt;/TD&gt;&lt;TD&gt;region&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;45283&lt;/TD&gt;&lt;TD&gt;2nd Check Opens Cons&lt;/TD&gt;&lt;TD&gt;61145&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;46042&lt;/TD&gt;&lt;TD&gt;Checking Funded SB&lt;/TD&gt;&lt;TD&gt;6157&lt;/TD&gt;&lt;TD&gt;Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;46976&lt;/TD&gt;&lt;TD&gt;Savings Open Cons&lt;/TD&gt;&lt;TD&gt;61892&lt;/TD&gt;&lt;TD&gt;North America&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;47997&lt;/TD&gt;&lt;TD&gt;Savings Funded Cons&lt;/TD&gt;&lt;TD&gt;61953&lt;/TD&gt;&lt;TD&gt;North America,Middle east&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with the possibilities to achieve the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Jun 2021 09:55:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813590#M66444</guid>
      <dc:creator>Correct_Answer</dc:creator>
      <dc:date>2021-06-08T09:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need to join two table for creating a derived_field</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813680#M66462</link>
      <description>&lt;P&gt;You can join all rows of both tables and then consolidate to a third table using the wildmatch() function and grouping the fields.&lt;/P&gt;&lt;P&gt;Once you load the 2 data sets, add the following load script:&lt;/P&gt;&lt;P&gt;Join (DataSet1)&lt;BR /&gt;Load Country as Country2,&lt;BR /&gt;Region&lt;BR /&gt;Resident DataSet2;&lt;/P&gt;&lt;P&gt;DataSet3:&lt;BR /&gt;Load SalesOrderID,&lt;BR /&gt;ProductName,&lt;BR /&gt;[Order Reference],&lt;BR /&gt;Concat(DISTINCT Region,',') as Region&lt;BR /&gt;Resident DataSet1&lt;BR /&gt;where WildMatch([Country],'*'&amp;amp;Country2&amp;amp;'*') &amp;gt; 0&lt;BR /&gt;Group by SalesOrderID, ProductName, [Order Reference];&lt;/P&gt;&lt;P&gt;drop tables DataSet1, DataSet2;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813680#M66462</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-06-08T14:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need to join two table for creating a derived_field</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813865#M66497</link>
      <description>&lt;P&gt;If your country-field from dataset 1 contained a valid delimiter between the multiple entries you could split them into multiple records, for example with:&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;subfield(Country, Delimiter) as Country&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;and on it you could simply join/map the dataset 2 against it.&lt;/P&gt;&lt;P&gt;If there is not such delimiter like it looked in your example because the country-items itself contain spaces and the delimiter seems to be a space it's not working.&lt;/P&gt;&lt;P&gt;In this case you could load the dataset 2 at first within a mapping-table and using mapsubstring() to replace the entries with the regions and/or you replaced them with their own value - but adding a valid delimiter to them. And then you could apply subfield() again like described above.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 09:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-join-two-table-for-creating-a-derived-field/m-p/1813865#M66497</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-06-09T09:38:03Z</dc:date>
    </item>
  </channel>
</rss>

