<?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 Synthetic Key Removal? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233105#M84649</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I set this up correctly. mast_key appears to be correct. It still concatenating the results 'correctly'. I did this but believe I am just running in circles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;Concatenate (SalesOrderHeader)&lt;BR /&gt;LOAD&lt;BR /&gt;if(SalesRep_ID='Website',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key&lt;BR /&gt;//SalesRep_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;BR /&gt;RESIDENT SalesOrderHeader;&lt;BR /&gt;&lt;BR /&gt;QuotaID:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessEntity_ID AS SalesRep_ID,&lt;BR /&gt;Quota AS QuotaID&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;QuotaDate:&lt;BR /&gt;LOAD&lt;BR /&gt;quota_date AS master_date,&lt;BR /&gt;Quota AS QuotaDate&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;QuotaFinal:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessEntity_ID AS SalesRep_ID,&lt;BR /&gt;quota_date AS master_date,&lt;BR /&gt;mast_key,&lt;BR /&gt;Quota&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE Quota;&lt;BR /&gt;DROP TABLE QuotaID;&lt;BR /&gt;DROP TABLE QuotaDate;&lt;BR /&gt;DROP FIELDS [master_date],[SalesRep_ID] FROM QuotaFinal;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Apr 2011 19:00:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-28T19:00:49Z</dc:date>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233096#M84640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to remove a synthetic key but am struggling how to do so. I have looked at a few examples on the community but am having a hard time translating this to my data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;//First two tables get combined. master_date combines all my dates together- to my calendar table. Sales_ID is a an identifier for each sales person.&lt;BR /&gt;OrderHeader:&lt;BR /&gt;&lt;B&gt;LOAD&lt;/B&gt;&lt;BR /&gt;date(OrderDate) AS master_date,&lt;BR /&gt;&lt;B&gt;SQL&lt;/B&gt; SELECT *&lt;BR /&gt;FROM OrderHeader;&lt;BR /&gt;SalesTerritory: //this table just joinsinto the OrderHeader table&lt;BR /&gt;LEFT JOIN (SalesOrderHeader) &lt;B&gt;LOAD&lt;/B&gt;&lt;BR /&gt;text(BusinessEntityID) AS Sales_ID,&lt;BR /&gt;&lt;B&gt;SQL&lt;/B&gt; SELECT *&lt;BR /&gt;FROM SalesTerritoryHistory;&lt;BR /&gt;Quota:&lt;BR /&gt;&lt;B&gt;LOAD&lt;/B&gt;&lt;BR /&gt;BusinessEntity_ID AS Sales_ID,&lt;BR /&gt;date(master_date) AS master_date,&lt;BR /&gt;RESIDENT QuotaTemp;&lt;BR /&gt;&lt;B&gt;DROP&lt;/B&gt; TABLE QuotaTemp;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This should be relatively straight forward but I seem to be missing something. It creates a key on master_date and sales_id.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 23:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233096#M84640</guid>
      <dc:creator />
      <dc:date>2011-04-27T23:00:46Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233097#M84641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well you've got Sales_ID and master_date in two different tables which is obviously the problem. That being said you need to concatenate a key like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sales_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I don't think I've ever seen date used as a key before but... I don't see any reason why you couldn't? I'm not exactly the go to guy for concatenating keys or anything but maybe that's a start. It's hard to say because you have SQL SELECT * in there twice and I have no idea what fields it's loading.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 16:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233097#M84641</guid>
      <dc:creator />
      <dc:date>2011-04-28T16:22:01Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233098#M84642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. I have tried this. This creates a 'unique key' just as it is supposed to. However it does not connect to the 'real keys'. I would like the SalesRep_ID (275, 276, etc..) to connect back to the 'real' SalesRep_ID and the same with the master_date (1/1/2007, etc). Currently it creates a unique key like this: 0|1/1/2007. Can I break down the key into its two parts and connect it back up within the OrderHeader and quota table? Or using a Resident Load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;if(SalesRep_ID='|',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key //my attempt to break it apart&lt;BR /&gt;SalesRepID_ID &amp;amp; '|' &amp;amp; master_date as 'Key' //creates the '275|1/1/2007' key&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 17:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233098#M84642</guid>
      <dc:creator />
      <dc:date>2011-04-28T17:42:18Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233099#M84643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is better advice. Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;Quota:&lt;BR /&gt;&lt;B&gt;LOAD&lt;/B&gt;&lt;BR /&gt;BusinessEntity_ID AS link_Sales_ID,&lt;BR /&gt;date(master_date) AS master_date,&lt;BR /&gt;RESIDENT QuotaTemp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;DROP&lt;/B&gt; TABLE QuotaTemp;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the SalesOrder table, add another field called [link_Sales_ID] that is exactly the same as Sales_ID. You might need to do this on a resident load and drop the initial table or you could probably just add the field twice (once for the first table the table is loaded and the other for the join).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only problem you might have is if there are Sales_ID's in the Quota table that are not in the SalesOrder table. If there are you probably need to make a link table by concatenating the two tables or something but... hopefully you don't need to do that because that's something I am terrible at. Hopefully this advice isn't terrible as I'm lucky and rarely need to do this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 17:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233099#M84643</guid>
      <dc:creator />
      <dc:date>2011-04-28T17:50:18Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233100#M84644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried something similar. See below. I am new to the Resident Loads as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;Concatenate (SalesOrderHeader)&lt;BR /&gt;LOAD&lt;BR /&gt;if(SalesRep_ID='|',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key&lt;BR /&gt;//SalesRepID_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;BR /&gt;RESIDENT SalesOrderHeader;&lt;BR /&gt;&lt;BR /&gt;Quota:&lt;BR /&gt;LOAD&lt;BR /&gt;//BusinessEntity_ID AS SalesRep_ID,&lt;BR /&gt;BusinessEntity_ID,&lt;BR /&gt;//date(master_date) AS master_date,&lt;BR /&gt;date(master_date) AS quota_date,&lt;BR /&gt;//BusinessEntity_ID &amp;amp; '|' &amp;amp; master_date as 'Key',&lt;BR /&gt;//AUTONUMBER(''&amp;amp;'-'&amp;amp; master_date &amp;amp;'-'&amp;amp; BusinessEntity_ID &amp;amp;'-'&amp;amp;'') AS MastKey,&lt;BR /&gt;if(BusinessEntity_ID='Website',0,BusinessEntity_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key,&lt;BR /&gt;//(QBusinessEntity_ID &amp;amp; '|' &amp;amp; QuarterStart(master_date)) AS master_key,&lt;BR /&gt;Quota&lt;BR /&gt;RESIDENT QuotaTemp;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE QuotaTemp;&lt;BR /&gt;&lt;BR /&gt;QuotaID:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessEntity_ID AS SalesRep_ID&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;QuotaDate:&lt;BR /&gt;LOAD&lt;BR /&gt;quota_date AS master_date&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE Quota;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;My question now is how do calculate the quota amount? If I put Quota on one of the tables it only calculates it by date or by id. How else I can calculate this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233100#M84644</guid>
      <dc:creator />
      <dc:date>2011-04-28T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233101#M84645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE style="margin:0px;"&gt;If you post a small .qvw that would help.&lt;/PRE&gt;&lt;P&gt;For example you have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;LEFT JOIN (SalesOrderHeader) &lt;B&gt;LOAD&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;but I don't see a SalesOrderHeader table in the code you posted. Is the date field in EVERY table? I'm not even sure how many tables there are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233101#M84645</guid>
      <dc:creator />
      <dc:date>2011-04-28T18:18:34Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233102#M84646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my schema with the key. This generates the correct results but I do not want the key to be created. My attempts to remove it have failed.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4846.sythkey.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4846.sythkey.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:20:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233102#M84646</guid>
      <dc:creator />
      <dc:date>2011-04-28T18:20:16Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233103#M84647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the section of my QVW. Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233103#M84647</guid>
      <dc:creator />
      <dc:date>2011-04-28T18:34:40Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233104#M84648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make the mast_key field in the QuoteFinal table as well and then do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;DROP FIELDS [master_date],[SalesRep_ID] FROM QuoteFinal;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;If you made the mast_key right, the fact that salesrep_ID and master_date aren't in that table won't matter b/c they are linked in the SalesOrderHeader table. Hopefully that works b/c if not... I'm lost.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233104#M84648</guid>
      <dc:creator />
      <dc:date>2011-04-28T18:35:05Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233105#M84649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I set this up correctly. mast_key appears to be correct. It still concatenating the results 'correctly'. I did this but believe I am just running in circles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;Concatenate (SalesOrderHeader)&lt;BR /&gt;LOAD&lt;BR /&gt;if(SalesRep_ID='Website',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key&lt;BR /&gt;//SalesRep_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;BR /&gt;RESIDENT SalesOrderHeader;&lt;BR /&gt;&lt;BR /&gt;QuotaID:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessEntity_ID AS SalesRep_ID,&lt;BR /&gt;Quota AS QuotaID&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;QuotaDate:&lt;BR /&gt;LOAD&lt;BR /&gt;quota_date AS master_date,&lt;BR /&gt;Quota AS QuotaDate&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;QuotaFinal:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessEntity_ID AS SalesRep_ID,&lt;BR /&gt;quota_date AS master_date,&lt;BR /&gt;mast_key,&lt;BR /&gt;Quota&lt;BR /&gt;RESIDENT Quota;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE Quota;&lt;BR /&gt;DROP TABLE QuotaID;&lt;BR /&gt;DROP TABLE QuotaDate;&lt;BR /&gt;DROP FIELDS [master_date],[SalesRep_ID] FROM QuotaFinal;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 19:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233105#M84649</guid>
      <dc:creator />
      <dc:date>2011-04-28T19:00:49Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233106#M84650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE style="margin:0px;"&gt;I don't think this part is right:&lt;BR /&gt;&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Concatenate (SalesOrderHeader)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if(SalesRep_ID='Website',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key&lt;/P&gt;&lt;P&gt;//SalesRep_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;/P&gt;&lt;P&gt;RESIDENT SalesOrderHeader;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make mast_key on the first load of the SalesOrderHeader table. Concatenate adds rows to the bottom of the table which isn't what you want. You want it joined, but you don't even need to do a join b/c you can just do it on the first load anyway. When I say concatenate a key in this case I just mean combine two fields to make a key like something|somethingelse which I guess is a poor choice of words on my part. In this case you shouldn't need to actually use the CONCATENATE statement for anything... I don't think. If you had a third table with mast_key then you probably would. If you could just post the qvw or a sample of it that would make it a lot easier b/c your trying to use two different "master" keys and I really don't see why you would need to do that but I can't tell without seeing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="192"&gt;&lt;COL span="3" style="width:48pt;" width="64" /&gt;&lt;TBODY&gt;&lt;TR style="height:15pt;"&gt;&lt;TD height="20" style="height:15pt;width:48pt;" width="64"&gt;&lt;/TD&gt;&lt;TD style="width:48pt;" width="64"&gt;&lt;/TD&gt;&lt;TD style="width:48pt;" width="64"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD align="right" height="20" style="height:15pt;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD height="20" style="height:15pt;"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="height:42px;" width="222"&gt;&lt;COL span="2" style="width:48pt;" width="64" /&gt;&lt;COL style="width:71pt;" width="94" /&gt;&lt;TBODY&gt;&lt;TR style="height:15pt;"&gt;&lt;TD height="20" style="height:15pt;width:48pt;" width="64"&gt;&lt;/TD&gt;&lt;TD style="width:48pt;" width="64"&gt;&lt;/TD&gt;&lt;TD style="width:71pt;" width="94"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD align="right" height="20" style="height:15pt;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 19:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233106#M84650</guid>
      <dc:creator />
      <dc:date>2011-04-28T19:09:04Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233107#M84651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this. The issue is the 'master_date' (OrderDate from SalesHeader table) and 'SalesRep_ID' (BusinessEntityID from Employee and Territory) are in separate tables. So I need to join them together. No one table besides the quote table contain both date and SalesRep_ID fields I need to make the join.&lt;/P&gt;&lt;P&gt;I have uploaded my QVW again. Let me know if this does not work for you. You have been a great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;//This with Concatenate (SalesOrderHeader). Does the same exact thing. You are correct.&lt;BR /&gt;BusinessEntity_ID &amp;amp; '|' &amp;amp; master_date AS 'Key',&lt;BR /&gt;//when I run this code. It runs out of virtual. So something is not right with this...&lt;BR /&gt;&lt;BR /&gt;LEFT JOIN (SalesOrderHeader) LOAD&lt;BR /&gt; //if(SalesRep_ID='Website',0,SalesRep_ID) &amp;amp;'|'&amp;amp; QuarterStart(master_date) AS mast_key&lt;BR /&gt; SalesRep_ID &amp;amp; '|' &amp;amp; master_date as 'Key'&lt;BR /&gt;RESIDENT SalesOrderHeader;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 19:32:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233107#M84651</guid>
      <dc:creator />
      <dc:date>2011-04-28T19:32:47Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233108#M84652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Jacob Bingen wrote:Here is my schema with the key. This generates the correct results but I do not want the key to be created. My attempts to remove it have failed.&lt;/PRE&gt;&lt;BR /&gt;Is this your original schema from before you tried to remove the synthetic key? If it generates the correct results, why do you not want the key to be created?&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 23:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233108#M84652</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-28T23:19:03Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233109#M84653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the original schema. It creates a synthetic key. I do not want the synthetic key to be generated. I am having a hard time creating a 'real' key that works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 21:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233109#M84653</guid>
      <dc:creator />
      <dc:date>2011-05-02T21:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233110#M84654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;if(BusinessEntity_ID='Website',text('Website'),BusinessEntity_ID) &amp;amp;'|'&amp;amp; num(QuarterStart(quota_date)) AS mast_key,&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had to ensure the data types were the same for the key to properly connect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 12:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233110#M84654</guid>
      <dc:creator />
      <dc:date>2011-05-06T12:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233111#M84655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again, if the synthetic key generated the correct results, why did you not want the key to be created?&amp;nbsp; Why did you think it was a problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A synthetic key is functionally identical to a real key of the same structure, which is what you've now built.&amp;nbsp; QlikView simply creates it for you instead of requiring you to go to the effort you just went to.&amp;nbsp; Now, replacing synthetic keys with real keys IS good experience.&amp;nbsp; It tells you something about what a synthetic key IS.&amp;nbsp; Probably every developer should do it once or twice.&amp;nbsp; But your application isn't now better as a result.&amp;nbsp; I'm betting your script now takes longer to execute and that your charts are no faster.&amp;nbsp; So now that you've taken the effort to hopefully understand how real keys and synthetic keys are related (by essentially duplicating the synthetic key), it might be a good idea to just go back to the synthetic key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I probably should have just explained up front why you didn't need to get rid of it instead of asking why you wanted to.&amp;nbsp; But I wasn't anticipating the forum being shut down right then, and I'm also genuinely curious.&amp;nbsp; I would really like to know why people have concluded that synthetic keys should be replaced with composite keys because the idea is &lt;EM&gt;ubiquitous&lt;/EM&gt;.&amp;nbsp; Heck, there are even suggestions to do so in the reference manual.&amp;nbsp; I have the feeling that some trainers and consultants are telling people that synthetic keys are always bad and should always be removed.&amp;nbsp; And certainly a lot of people see them in bad data models, and maybe conclude that the symptom is the disease.&amp;nbsp; Synthetic keys ARE sometimes bad, but only in the sense that sometimes your data model is bad, and some synthetic keys are a result of that bad data model.&amp;nbsp; But to the best of my knowlege, simply replacing a synthetic key 1:1 with a real key is useless.&amp;nbsp; If the data model was bad, doing that doesn't fix the data model - you're removing a symptom, not curing the disease.&amp;nbsp; And if the data model was good, changing a synthetic key to a real key gives nothing of value, wastes developer time, and slows down the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More infomation here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/10279"&gt;http://community.qlik.com/thread/10279&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, good lord.&amp;nbsp; The forum move completely trashed the formatting in some of the posts, dropped included pictures, and so on.&amp;nbsp; I'm going to need to fix that.&amp;nbsp; Or maybe just start over and write a document with everything from the thread that I consider important.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 21:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233111#M84655</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-06T21:18:22Z</dc:date>
    </item>
    <item>
      <title>Synthetic Key Removal?</title>
      <link>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233112#M84656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The requirments of the document required it to be removed. Yes this is being taught in training classes as something 'bad.'&amp;nbsp; I noticed no performance increase or decrease when removing the automatically created key into the key I created.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have multiple synthetic in our production application and none of them effect the performance of the application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 17:52:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Synthetic-Key-Removal/m-p/233112#M84656</guid>
      <dc:creator />
      <dc:date>2011-05-09T17:52:34Z</dc:date>
    </item>
  </channel>
</rss>

