<?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: Combining 3 Tables Issues in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Combining-3-Tables-Issues/m-p/1890595#M73369</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think your field&amp;nbsp;&lt;SPAN&gt;Montage_aspnet_UsersInRoles_$(vLoopRegion)_OID is differently named on the three tables, so the auto concatenate fails. If you alias that field so is the same it may work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Generally I found when working with Qlik a lot if I wanted to concatenate reliably I would force it by using CONCATENATE ahead of the load ... appreciate&amp;nbsp;gets messy if you are trying to loop, although here if you are only ever going&amp;nbsp;to have 3 regions I am not sure the complexity of having the loop is really worth it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Chris.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 19:02:28 GMT</pubDate>
    <dc:creator>chrismarlow</dc:creator>
    <dc:date>2022-02-08T19:02:28Z</dc:date>
    <item>
      <title>Combining 3 Tables Issues</title>
      <link>https://community.qlik.com/t5/App-Development/Combining-3-Tables-Issues/m-p/1890470#M73354</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;
&lt;P&gt;I am currently attempting to combine three identical tables together, with the only difference being the title of each table houses either US, AU or EU. To make loading easy, I provided the following logic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let vLoopRegion1 = 'AU';&lt;BR /&gt;Let vLoopRegion2 = 'EU';&lt;BR /&gt;Let vLoopRegion3 = 'US';&lt;BR /&gt;Let vRegionCount=3;&lt;/P&gt;
&lt;P&gt;Let vTableName='InterviewUsers';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let LoopCounter = 1;&lt;BR /&gt;Let vLoopRegion=vLoopRegion1;&lt;BR /&gt;for LoopCounter=1 to $(vRegionCount)&lt;BR /&gt;Let vLoopRegion=vLoopRegion$(LoopCounter);&lt;BR /&gt;Trace --- Loading $(vLoopRegion) ---;&lt;BR /&gt;[$(vTableName)]:&lt;BR /&gt;LOAD AspNetUserID, &lt;BR /&gt;CustomerId, &lt;BR /&gt;Email, &lt;BR /&gt;ExternalIdentifier, &lt;BR /&gt;IsApproved, &lt;BR /&gt;IsCandidate, &lt;BR /&gt;Montage_aspnet_UsersInRoles_$(vLoopRegion)_OID, &lt;BR /&gt;RoleLevel, &lt;BR /&gt;RoleName, &lt;BR /&gt;RolesId, &lt;BR /&gt;Src, &lt;BR /&gt;UserInfo_CreatedOn, &lt;BR /&gt;UserInfo_ModifiedOn;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;SELECT "AspNetUserID",&lt;BR /&gt;"CustomerId",&lt;BR /&gt;"Email",&lt;BR /&gt;"ExternalIdentifier",&lt;BR /&gt;"IsApproved",&lt;BR /&gt;"IsCandidate",&lt;BR /&gt;"Montage_aspnet_UsersInRoles_$(vLoopRegion)_OID",&lt;BR /&gt;"RoleLevel",&lt;BR /&gt;"RoleName",&lt;BR /&gt;"RolesId",&lt;BR /&gt;"Src",&lt;BR /&gt;"UserInfo_CreatedOn",&lt;BR /&gt;"UserInfo_ModifiedOn"&lt;BR /&gt;FROM "MHDW"."EDM"."Dim_MO_UserAndRole_$(vLoopRegion)";&lt;BR /&gt;Next;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This effectively loads all 3 tables one after another until the loop is complete. It was my understanding that they would auto concatenate, however upon running this, the data model provides this result, opposed to one table with data from all 3 tables (Screenshot attached). Does anyone know why this is happening/how i can fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 16:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Combining-3-Tables-Issues/m-p/1890470#M73354</guid>
      <dc:creator>Christopher_Lawrence</dc:creator>
      <dc:date>2022-02-08T16:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 3 Tables Issues</title>
      <link>https://community.qlik.com/t5/App-Development/Combining-3-Tables-Issues/m-p/1890595#M73369</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think your field&amp;nbsp;&lt;SPAN&gt;Montage_aspnet_UsersInRoles_$(vLoopRegion)_OID is differently named on the three tables, so the auto concatenate fails. If you alias that field so is the same it may work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Generally I found when working with Qlik a lot if I wanted to concatenate reliably I would force it by using CONCATENATE ahead of the load ... appreciate&amp;nbsp;gets messy if you are trying to loop, although here if you are only ever going&amp;nbsp;to have 3 regions I am not sure the complexity of having the loop is really worth it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Chris.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Combining-3-Tables-Issues/m-p/1890595#M73369</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2022-02-08T19:02:28Z</dc:date>
    </item>
  </channel>
</rss>

