<?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: Why does this script create a synthetic key? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602219#M222665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u have 2 tables SDT and tasks.&lt;/P&gt;&lt;P&gt;If there are more than 1 key common in 2 tables, it will create synthetic key.&lt;/P&gt;&lt;P&gt;You have 2 keys common in ur tables:&lt;/P&gt;&lt;P&gt;1. ProductName&lt;/P&gt;&lt;P&gt;2. SDTQuarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not required rename one of the field name, this will remove ur synthetic keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 07:22:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-22T07:22:55Z</dc:date>
    <item>
      <title>Why does this script create a synthetic key?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602218#M222664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a script to load two different tables; linking those using ProductName and SDTQuarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script looks like below (shortened). The SDT-table is loaded both from Sharepoint and from local saved file where the vQuarter-value has been stored.&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="_jivemacro_uid_13981512363122750 jive_text_macro jive_macro_code" jivemacro_uid="_13981512363122750" modifiedtitle="true"&gt;
&lt;P&gt;LET vQuarter = Date(floor(today()), 'YYYY') &amp;amp; '-Q' &amp;amp; ceil(num(MONTH(Date(floor(today()),'M/D/YY')))/3,1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;SDT:&lt;/P&gt;
&lt;P&gt;ows_Title AS ProductName,&lt;/P&gt;
&lt;P&gt;'$(vQuarter)' AS SDTQuarter,&lt;/P&gt;
&lt;P&gt;PMHours AS SDTPM&lt;/P&gt;
&lt;P&gt;FROM Sharepoint &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tasks:&lt;/P&gt;
&lt;P&gt;trim(subfield(ows_Product_x0020_Name, '#', 2)) AS ProductName,&lt;/P&gt;
&lt;P&gt;Date(floor(ows_Task_x0020_Golive_x0020_Date), 'YYYY') &amp;amp; '-Q' &amp;amp; ceil(num(MONTH(Date(floor(ows_Task_x0020_Golive_x0020_Date))),'M/D/YY')/3,1) AS SDTQuarter,&lt;/P&gt;
&lt;P&gt;subfield(ows_Project_x0020_Manager,'#',2) AS TaskPM&lt;/P&gt;
&lt;P&gt;FROM Sharepoint&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running this script I get a synthetic table. If I remove line 11 all is fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand when why this is; I've tried to compare the SDTQuarter field as it looks in both tables and it is identical (eg. "2014-Q1") so QV should be able to match all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please help me understand what the problem might be?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 07:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602218#M222664</guid>
      <dc:creator />
      <dc:date>2014-04-22T07:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this script create a synthetic key?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602219#M222665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u have 2 tables SDT and tasks.&lt;/P&gt;&lt;P&gt;If there are more than 1 key common in 2 tables, it will create synthetic key.&lt;/P&gt;&lt;P&gt;You have 2 keys common in ur tables:&lt;/P&gt;&lt;P&gt;1. ProductName&lt;/P&gt;&lt;P&gt;2. SDTQuarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not required rename one of the field name, this will remove ur synthetic keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 07:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602219#M222665</guid>
      <dc:creator />
      <dc:date>2014-04-22T07:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this script create a synthetic key?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602220#M222666</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;If your both table are connected with more then 1 common field then synthetic key is created.&lt;/P&gt;&lt;P&gt;If you have same data you can comment in both field you can comment quarter from any one of the two.&lt;/P&gt;&lt;P&gt;If you want to create link on both the field from two tables, then create composite key instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 07:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602220#M222666</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-04-22T07:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this script create a synthetic key?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602221#M222667</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;Any tables can be linked using one common field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are more than 1 common field then it will re result to synthetic key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to rename the SDTQuarter in the script level later in the front end(charts e.t.c..) u can rename .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 07:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602221#M222667</guid>
      <dc:creator>vardhancse</dc:creator>
      <dc:date>2014-04-22T07:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this script create a synthetic key?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602222#M222668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, I didn't know I could only have one key without synthetic. I'll just merge two fields and use that as key then. Thank you all for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 07:29:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-script-create-a-synthetic-key/m-p/602222#M222668</guid>
      <dc:creator />
      <dc:date>2014-04-22T07:29:29Z</dc:date>
    </item>
  </channel>
</rss>

