<?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: Conditional Left Join of Fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658441#M1056195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Truly a miracle. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2014 06:47:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-20T06:47:22Z</dc:date>
    <item>
      <title>Conditional Left Join of Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658439#M1056193</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 a fact table like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;%Key1,&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;from ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I want to load and join a lookup table. This lookup has the following fields:&lt;/P&gt;&lt;P&gt;%key, year2011value, year2012value, year2013value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When joining, I need to pick one of the yearXXXXvalue from each row in the lookup that corresponds to the Year column of the joining row in the customer table. So I tried the following join:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (customer)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; %Key1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pick(Year-2010,&lt;SPAN style="font-size: 13.6000003814697px;"&gt;year2011value, year2012value, year2013value&lt;/SPAN&gt;) as myField&lt;/P&gt;&lt;P&gt;FROM lookup.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;But QV complains "file not found Year" . Apparently, It can not reference the Year column of the customer table while joining. How can this be done?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 04:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658439#M1056193</guid>
      <dc:creator />
      <dc:date>2014-10-20T04:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Left Join of Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658440#M1056194</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 suggest that you do a cross-table load of the lookup table into a temporary table and then join that to your fact table. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer:&lt;/P&gt;&lt;P&gt;LOAD ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempLookup:&lt;/P&gt;&lt;P&gt;Crosstable (Year, Value)&lt;/P&gt;&lt;P&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;%key, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year2011value, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year2012value, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year2013value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM lookup.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Left Join (customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LOAD %key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(Mid(Year, 5, 4)) As Year,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get year value out of the label&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value As myField&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident TempLookup;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DROP Table TempLookup;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jonathan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 05:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658440#M1056194</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-10-20T05:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Left Join of Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658441#M1056195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Truly a miracle. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 06:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Left-Join-of-Fields/m-p/658441#M1056195</guid>
      <dc:creator />
      <dc:date>2014-10-20T06:47:22Z</dc:date>
    </item>
  </channel>
</rss>

