<?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: Issue in Join two tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579788#M442759</link>
    <description>&lt;P&gt;Hi Pooja,&lt;/P&gt;&lt;P&gt;try below one.&lt;BR /&gt;A:&lt;/P&gt;&lt;P&gt;LOAD Code,&lt;BR /&gt;Shpper as Name,&lt;BR /&gt;Final_amt&lt;BR /&gt;FROM&lt;BR /&gt;Source A;&lt;/P&gt;&lt;P&gt;Left Join (A)&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;LOAD Code,&lt;BR /&gt;Price,&lt;BR /&gt;Category&lt;BR /&gt;FROM&lt;BR /&gt;Source B;&lt;BR /&gt;&lt;BR /&gt;Do the calculation in straight table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Take dimensions as Name and Category&lt;BR /&gt;Measure as Sum(Price)&lt;BR /&gt;&lt;BR /&gt;You will have the below output.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;Pen&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;Pencil&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;ink&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Peter&lt;/TD&gt;&lt;TD&gt;food&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Peter&lt;/TD&gt;&lt;TD&gt;Travel&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sultan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2019 07:09:22 GMT</pubDate>
    <dc:creator>sultanam</dc:creator>
    <dc:date>2019-05-14T07:09:22Z</dc:date>
    <item>
      <title>Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579735#M442750</link>
      <description>&lt;P&gt;Hi Qlikis,&lt;/P&gt;&lt;P&gt;Need a help on this. This is a sample based on my requirement.&lt;/P&gt;&lt;P&gt;Question:&lt;BR /&gt;Table 1 has total amount spend by shopper.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tablea513.JPG" style="width: 308px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11977i209F82F3DF9FB1CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tablea513.JPG" alt="Tablea513.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;Table 2 has details for those expenses like categories.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tableb513.JPG" style="width: 290px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11976iA8C8121E03E77F3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tableb513.JPG" alt="tableb513.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As per table 1, Total amount spent by Peter is 90 for different category. By doing left join i am not able to get the right amount for category wise. Suggest me how to join the table to get the below output.&lt;/P&gt;&lt;P&gt;Output with Right Answer&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="answer.JPG" style="width: 345px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11975i15C939576999454D/image-size/large?v=v2&amp;amp;px=999" role="button" title="answer.JPG" alt="answer.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find attached Qlik file..&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 02:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579735#M442750</guid>
      <dc:creator>poooja</dc:creator>
      <dc:date>2019-05-14T02:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579738#M442751</link>
      <description>try below&lt;BR /&gt;&lt;BR /&gt;Load distinct code, shopper from table1;&lt;BR /&gt;Right Join&lt;BR /&gt;Load code,category,price from table2;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Prashant Sangle</description>
      <pubDate>Tue, 14 May 2019 03:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579738#M442751</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2019-05-14T03:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579759#M442754</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Why would you like to have 'aaa' in your output table as a &lt;STRONG&gt;name&lt;/STRONG&gt; if it is actually a &lt;STRONG&gt;code&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Jaime&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 06:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579759#M442754</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-05-14T06:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579771#M442756</link>
      <description>&lt;P&gt;This is not working.&amp;nbsp; I am not able to get expected output.&lt;/P&gt;&lt;P&gt;Also i cannot do distinct code here as my corporate account keep on adding some lines in the table1 with some new amounts.&lt;/P&gt;&lt;P&gt;Please any other idea!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 06:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579771#M442756</guid>
      <dc:creator>poooja</dc:creator>
      <dc:date>2019-05-14T06:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579777#M442757</link>
      <description>&lt;P&gt;The solution looks correct, except perhaps you need a left join or an outer join and you may need to align the field names with your data.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;This is not working.&amp;nbsp; I am not able to get expected output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Its not possible to solve a problem with this amount of information. What did you try? What did you get? What is wrong with the output you got.....&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;Also i cannot do distinct code here as my corporate account keep on adding some lines in the table1 with some new amounts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This does not make sense to me. Adding new lines to table 1 does not conflict with using a distinct. The distinct prevents doubling of the data if a name or code is duplicated. If you don't like this you could use an ApplyMap to add the names to table2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 06:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579777#M442757</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-05-14T06:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579778#M442758</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 673px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11980i82D41071086683D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Your output expecting&amp;nbsp; [aaa, inc, 20] seems odd to me. The code aaa will join with George.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that when joining table2 to the final amount table you will not be able to sum final_amt no more as you will duplicate the final_amount to every code matching row.&lt;/P&gt;&lt;P&gt;Please find attached qvw.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 06:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579778#M442758</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-05-14T06:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Join two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579788#M442759</link>
      <description>&lt;P&gt;Hi Pooja,&lt;/P&gt;&lt;P&gt;try below one.&lt;BR /&gt;A:&lt;/P&gt;&lt;P&gt;LOAD Code,&lt;BR /&gt;Shpper as Name,&lt;BR /&gt;Final_amt&lt;BR /&gt;FROM&lt;BR /&gt;Source A;&lt;/P&gt;&lt;P&gt;Left Join (A)&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;LOAD Code,&lt;BR /&gt;Price,&lt;BR /&gt;Category&lt;BR /&gt;FROM&lt;BR /&gt;Source B;&lt;BR /&gt;&lt;BR /&gt;Do the calculation in straight table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Take dimensions as Name and Category&lt;BR /&gt;Measure as Sum(Price)&lt;BR /&gt;&lt;BR /&gt;You will have the below output.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;Pen&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;Pencil&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;George&lt;/TD&gt;&lt;TD&gt;ink&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Peter&lt;/TD&gt;&lt;TD&gt;food&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Peter&lt;/TD&gt;&lt;TD&gt;Travel&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sultan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 07:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Join-two-tables/m-p/1579788#M442759</guid>
      <dc:creator>sultanam</dc:creator>
      <dc:date>2019-05-14T07:09:22Z</dc:date>
    </item>
  </channel>
</rss>

