<?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: How to merge two tables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-merge-two-tables/m-p/1395538#M423683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1502659115511735 jive_text_macro" jivemacro_uid="_1502659115511735"&gt;
&lt;P&gt;T1:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Area, Resource, Sys1Allocation&lt;/P&gt;
&lt;P&gt;Finance, Amy,1&lt;/P&gt;
&lt;P&gt;Accounting, Jack,1&lt;/P&gt;
&lt;P&gt;IT, Mary,1&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JOIN&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Area, Resource, Hobby, Sys2Allocation&lt;/P&gt;
&lt;P&gt;Finance, Amy, Fishing, 1.1&lt;/P&gt;
&lt;P&gt;Accounting, Jack, Game, 0.7&lt;/P&gt;
&lt;P&gt;Accounting, Jack, Movie, 0.35&lt;/P&gt;
&lt;P&gt;IT, Mary, Dancing, 0.45&lt;/P&gt;
&lt;P&gt;IT, Mary, Movie, 0.65&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JOIN&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;Area, Resource, Sum(Sys2Allocation) AS Tot&lt;/P&gt;
&lt;P&gt;RESIDENT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; T1&lt;/P&gt;
&lt;P&gt;GROUP BY&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Area, Resource;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;T2:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sys2Allocation / Tot AS Sys1AllocationPercentage&lt;/P&gt;
&lt;P&gt;RESIDENT&lt;/P&gt;
&lt;P&gt;&amp;nbsp; T1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;DROP TABLE T1;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However you might have to modify the calculation so it involves Sys1Allocation too... didn't understand from your explanation how it should be involved...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Aug 2017 21:19:56 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2017-08-13T21:19:56Z</dc:date>
    <item>
      <title>How to merge two tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-merge-two-tables/m-p/1395537#M423682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have two systems for forecast (please don't ask me why... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;), so I have Sys1Allocation in Table 1 and Sys2Allocation in Table 2. Allocations may be slightly different in two systems because of rounding, slightly different calendar being used, etc. System 1 is our system of record but system 2 contains some field (Hobby as an example below) that system 1 doesn't have but important to be used in our reporting. We get two flat files from system 1 and 2 everyday. Now the goal is to merge the two tables below and generate a new table. Is it a possible mission? Please let me know if there's any question. Your help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blue percentage column doesn't exist in table. It is calculated based on person's sys2allocation. Not sure if this can be done easily. Can this be done on the fly in scripting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/173295_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Aug 2017 20:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-merge-two-tables/m-p/1395537#M423682</guid>
      <dc:creator>posywang</dc:creator>
      <dc:date>2017-08-13T20:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-merge-two-tables/m-p/1395538#M423683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1502659115511735 jive_text_macro" jivemacro_uid="_1502659115511735"&gt;
&lt;P&gt;T1:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Area, Resource, Sys1Allocation&lt;/P&gt;
&lt;P&gt;Finance, Amy,1&lt;/P&gt;
&lt;P&gt;Accounting, Jack,1&lt;/P&gt;
&lt;P&gt;IT, Mary,1&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JOIN&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Area, Resource, Hobby, Sys2Allocation&lt;/P&gt;
&lt;P&gt;Finance, Amy, Fishing, 1.1&lt;/P&gt;
&lt;P&gt;Accounting, Jack, Game, 0.7&lt;/P&gt;
&lt;P&gt;Accounting, Jack, Movie, 0.35&lt;/P&gt;
&lt;P&gt;IT, Mary, Dancing, 0.45&lt;/P&gt;
&lt;P&gt;IT, Mary, Movie, 0.65&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JOIN&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;Area, Resource, Sum(Sys2Allocation) AS Tot&lt;/P&gt;
&lt;P&gt;RESIDENT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; T1&lt;/P&gt;
&lt;P&gt;GROUP BY&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Area, Resource;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;T2:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sys2Allocation / Tot AS Sys1AllocationPercentage&lt;/P&gt;
&lt;P&gt;RESIDENT&lt;/P&gt;
&lt;P&gt;&amp;nbsp; T1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;DROP TABLE T1;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However you might have to modify the calculation so it involves Sys1Allocation too... didn't understand from your explanation how it should be involved...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Aug 2017 21:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-merge-two-tables/m-p/1395538#M423683</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2017-08-13T21:19:56Z</dc:date>
    </item>
  </channel>
</rss>

