<?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: Help with generic keys with 2 facts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871648#M653882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems like the Fact1 table is related to Fact2 table with DocNoID and if you are saying that you cannot get the dates, then it sounds like not all DocNoIDs have dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can post a simple data which could make it easier to understand the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2015 13:39:43 GMT</pubDate>
    <dc:creator>sinanozdemir</dc:creator>
    <dc:date>2015-07-02T13:39:43Z</dc:date>
    <item>
      <title>Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871645#M653879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;I have following tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact1:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;DocNoID,&lt;/P&gt;&lt;P&gt;Amount,&lt;/P&gt;&lt;P&gt;SalespersonID,&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;Resident All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact2:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;DocNoID,&lt;/P&gt;&lt;P&gt;CustomerID,&lt;/P&gt;&lt;P&gt;EndcustomerID&lt;/P&gt;&lt;P&gt;Resident Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer:&lt;/P&gt;&lt;P&gt;Load CustomerID, Customername, CustomerCountry&lt;/P&gt;&lt;P&gt;Resident Customer.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endcustomer:&lt;/P&gt;&lt;P&gt;Load EndcustomerID, Endcustomername, EndcustomerCountry&lt;/P&gt;&lt;P&gt;Resident Endcustomer.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TargetsByYear:&lt;/P&gt;&lt;P&gt;SalespersonID,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;TargetAmount&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp; XY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which way is right to make generic keys?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 12:37:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871645#M653879</guid>
      <dc:creator />
      <dc:date>2015-07-02T12:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871646#M653880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to be lazy and say how about dividing Fact2 table into two tables - one is for CustomerID and the other one is for EndcustomerID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocNoID,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Sales;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Fact3:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocNoID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndcustomerID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Sales;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 13:20:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871646#M653880</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-07-02T13:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871647#M653881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is, I can't get the date of the targets together with the other date table from Fact1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 13:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871647#M653881</guid>
      <dc:creator />
      <dc:date>2015-07-02T13:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871648#M653882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems like the Fact1 table is related to Fact2 table with DocNoID and if you are saying that you cannot get the dates, then it sounds like not all DocNoIDs have dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can post a simple data which could make it easier to understand the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 13:39:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871648#M653882</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-07-02T13:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871649#M653883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the load of Facts1 into something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Fact1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DocNoID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Amount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SalespersonID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SalesPersonID &amp;amp; '|' &amp;amp; YearStart(Date) AS TargetDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Resident All;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the last load of TargetsByYear into something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;TargetsByYear:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// SalespersonID, // Normalized. Which table has more SalesPersonIDs?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SalesPersonID &amp;amp; '|' &amp;amp; YearStart(Date) AS TargetDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;TargetAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM&amp;nbsp; XY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this do the job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Edit] Modified the code so that you can get Year Targets by SalesPerson. TargetDate has become a real key that includes the year and the SalesPerson. Just a guess of what you are up to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 13:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871649#M653883</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-07-02T13:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with generic keys with 2 facts</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871650#M653884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I missed the last part of the script. I think your solution should do the trick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 13:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-generic-keys-with-2-facts/m-p/871650#M653884</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-07-02T13:44:14Z</dc:date>
    </item>
  </channel>
</rss>

