<?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: joining 2 fields from different tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/joining-2-fields-from-different-tables/m-p/415966#M154685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not to change your key field name, to have direct association (key with the same name) between &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;CUSTOMERS and TRANSACTIONS&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;For instance name &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;%mainstorenumber__member__ID as &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;%transaction__store__ID ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 May 2013 23:01:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-28T23:01:15Z</dc:date>
    <item>
      <title>joining 2 fields from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/joining-2-fields-from-different-tables/m-p/415965#M154684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;i have two big tables CUSTOMERS (12 m. records) and TRANSACTIONS (24 million records). in customers i have the field %mainstorenumber__member__ID and in transactions the field %transaction__store__Id.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;I need to make a query where i sum the sales for the last 365 days and where the %transaction__store__ID = %mainstorenumber__member__ID. for this i planned to create a flag, where "1" means that the transaction store was the main store, and "0" if this is not the case&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;I created a new table, joining both fields in that new table, which created some synthetic tables in the data model, but worked and got the numbers i needed. the problem is, when filtering, the dimensions numbers change. The model is not stable and wanted to know, how can i create the "%flagmainstore" field (below), without needing to create a new table. I tried with &lt;STRONG&gt;join load &lt;/STRONG&gt;of the couple of&amp;nbsp; fields of the customer table i needed into the transaction table, but it did not work. where should i put my "IF" condition? (with the if is also very slow). I tried with set analysis, but i do not get the correct numbers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;membermainstoresales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%member__transaction__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%mainstorenumber__member__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;member_NonMember&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; member &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;where&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;member_NonMember&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = 'Member';&lt;BR /&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Right&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Join&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(membermainstoresales)&lt;BR /&gt;transactionmainstoresales:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%member__transaction__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%transaction__store__ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; transaction;&lt;BR /&gt;&lt;BR /&gt;mainstoresales:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%member__transaction__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%mainstorenumber__member__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%transaction__store__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;member_NonMember&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%mainstorenumber__member__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;%transaction__store__ID&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,1,0) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;%flagmainstore&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; membermainstoresales;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;drop&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; membermainstoresales; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 16:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/joining-2-fields-from-different-tables/m-p/415965#M154684</guid>
      <dc:creator>felcar2013</dc:creator>
      <dc:date>2013-05-28T16:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: joining 2 fields from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/joining-2-fields-from-different-tables/m-p/415966#M154685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not to change your key field name, to have direct association (key with the same name) between &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;CUSTOMERS and TRANSACTIONS&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;For instance name &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;%mainstorenumber__member__ID as &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;%transaction__store__ID ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 23:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/joining-2-fields-from-different-tables/m-p/415966#M154685</guid>
      <dc:creator />
      <dc:date>2013-05-28T23:01:15Z</dc:date>
    </item>
  </channel>
</rss>

