<?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: Linked Tables - How to specify which table data come from? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487650#M480452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shuyu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that you create one table out of two:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, I suggest to add a flag field:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'A' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'B' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you select Flag='B', you get the data from the table B only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not concatenate, but just link the tables by ID, it is essentially the same except the flag fields must have different names.&amp;nbsp; Or you duplicate ID if you prefer:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;...,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID as ID_A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;...,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID as ID_B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select all values in the field ID_B to get IDs from the table B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Nov 2013 15:01:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-25T15:01:11Z</dc:date>
    <item>
      <title>Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487647#M480449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables linked together by Item ID. Table A has three Items while Table B has 5 items. There are 2 common items shared between table A and table B, 1 extra items from Table A and 3 from Table B. When I try to use Item ID as dimension it returns all 6 different Items but I need the 5 items from table B. Is there a way to specify from which table the data come? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table B&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;BR /&gt;Now Qlikview returns 1,2,3,5,6,7 but I only want 1,2,5,6,7 from Table B as my dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 14:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487647#M480449</guid>
      <dc:creator />
      <dc:date>2013-11-25T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487648#M480450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add an additional field, a flag that says what the data source is.&amp;nbsp; It could be:&lt;BR /&gt;'A' as Flag // for table A&lt;/P&gt;&lt;P&gt;'B' as Flag // for table B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 14:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487648#M480450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-25T14:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487649#M480451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for replying. I don't really understand it though. Do you mean add additional field in my data file?? COuld you please explain in a little more detail on how I should do it or give me a sample file? Thank you~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 14:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487649#M480451</guid>
      <dc:creator />
      <dc:date>2013-11-25T14:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487650#M480452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shuyu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that you create one table out of two:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, I suggest to add a flag field:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'A' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'B' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you select Flag='B', you get the data from the table B only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not concatenate, but just link the tables by ID, it is essentially the same except the flag fields must have different names.&amp;nbsp; Or you duplicate ID if you prefer:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;...,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID as ID_A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;...,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID as ID_B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select all values in the field ID_B to get IDs from the table B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 15:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487650#M480452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-25T15:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487651#M480453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the explanation!!&lt;/P&gt;&lt;P&gt;For the first approach, what is the syntax of adding flag field?? Adding one extra line of ( 'A' as Flag) doesn't seem to work?&lt;/P&gt;&lt;P&gt;For the second approach, if I name ID as different names ID_A and ID_B, will the two tables still link together by ID?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 15:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487651#M480453</guid>
      <dc:creator />
      <dc:date>2013-11-25T15:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Linked Tables - How to specify which table data come from?</title>
      <link>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487652#M480454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first approach is for situation where you concatenate both tables in one.&amp;nbsp; If you do it, and it doesn't work - upload an example so I can see it.&amp;nbsp; The syntax is the one in bold.&lt;/P&gt;&lt;P&gt;For the second approach - I do not say to rename ID,&amp;nbsp; I say to create duplicates of the ID.&amp;nbsp; That is, you have field ID in &lt;STRONG&gt;both tables &lt;/STRONG&gt;for linking, field ID_A &lt;STRONG&gt;only&lt;/STRONG&gt; in table 1, and field ID_B &lt;STRONG&gt;only &lt;/STRONG&gt;in table 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 15:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linked-Tables-How-to-specify-which-table-data-come-from/m-p/487652#M480454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-25T15:21:59Z</dc:date>
    </item>
  </channel>
</rss>

