<?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: Load script table and calculate field using another table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278497#M850931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed there was now two columns for the Policy# in the table: &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[Policy]&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[Policy Num]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 67 and down then suddenly made sense to me and I tweaked it by replacing the rest of the code with the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1489749724377394" jivemacro_uid="_1489749724377394"&gt;
&lt;P&gt;IntervalMatch(Date, [Policy])&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD [From Date], [To Date], [Policy Num] as [Policy]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD [Responsible Partner], [From Date], [To Date], [Policy Num] as [Policy]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Intervals;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the load of the INTERVALS table added a new field called Policy Num where I should have renamed the field to match the ALLDATA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second load was just to add the responsible partner to the ALLDATA table - I can probably drop the [To Date] and I will still get the same result. Let me know if you think there is a quicker way (ALLDATA will grow by about 50k items a month).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for helping @Jonathan Dienst&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Mar 2017 11:31:32 GMT</pubDate>
    <dc:creator>pjn123pjn123</dc:creator>
    <dc:date>2017-03-17T11:31:32Z</dc:date>
    <item>
      <title>Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278492#M850926</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've tried to find something similar in the help but could not get something to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to generate data in a table by doing a lookup in another temp table to see who was the responsible person at that date.&lt;/P&gt;&lt;P&gt;Please see below the the code I have currently. Line 18 is where I think things should happen (maybe with FirstSortedValue?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14894104591738417" jivemacro_uid="_14894104591738417"&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;LOAD [Policy], &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [From Date], &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Responsible person]&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;C&gt;&lt;/C&gt;&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;LOAD [Date] as [Transaction date], &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Client, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Policy #], &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Commission (incl. VAT)] as Commission, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ????? as [Person]&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;C&gt;&lt;/C&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (ooxml, embedded labels);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE Table2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156099_example.png" style="height: 181px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278492#M850926</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278493#M850927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please explain how are you expecting the Person from Table 2 to be mapped to Table1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean based on which field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 13:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278493#M850927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-13T13:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278494#M850928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example for first line in Table 1:&lt;/P&gt;&lt;P&gt;Step 1: Find all the items in Table 2 with Policy = 11&lt;/P&gt;&lt;P&gt;Step 2: Sort these items according to "From Date" (Newest to Oldest)&lt;/P&gt;&lt;P&gt;Step 3: Return the "Responsible Person" of the first record in in Step 2 with a "From Date" &amp;lt; "Date"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 13:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278494#M850928</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2017-03-13T13:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278495#M850929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks like a slowly changing dimension, for which I would use an interval match&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First load the lookup table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T_Table2: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [Policy], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [From Date], &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Responsible person] &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM &lt;C&gt; &lt;/C&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a To Date for the interval:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Intervals:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [Policy],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; If(Policy = Previous(Policy),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Previous([From Date]),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Today()) as [To Date],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [From Date],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Responsible person]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident T_Table2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Order by Policy, [From Date] DESC;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table T_Table2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load the main data table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [Date] as [Transaction date],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Client,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Policy #],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Commission (incl. VAT)] as Commission,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM &lt;C&gt;&lt;/C&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now do the interval matching (respecting the Policy Number):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IntervalMatch(Date, Policy)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join (Table1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD [From Date], [To Date], Policy&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Intervals;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, bring the [Responsible person]&amp;nbsp; into the main table (not strictly necessary):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// optional&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join (Table1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Intervals;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Drop Table Intervals;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// optional&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Now [Responsible person] will appear as a field in Table1.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 13:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278495#M850929</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-03-13T13:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278496#M850930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help - I think we're getting closer.&lt;/P&gt;&lt;P&gt;If I load the script as it is now (see at the bottom), the AllData table now have 16x3 lines where it should only have 3 lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The targeted end results should only have the original AllData table, with the corresponding Responsible Partner next to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remove the code from the IntervalMatch line 67 down it looks like the two tables are loading correctly:&lt;/P&gt;&lt;P&gt;AllData&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="156181" alt="AllData.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156181_AllData.PNG" style="height: 74px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intervals (PS: This table will have data that is not present in AllData)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="156194" alt="Intervals.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/156194_Intervals.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14894769608298439" jivemacro_uid="_14894769608298439"&gt;
&lt;P&gt;//First load the lookup table&lt;/P&gt;
&lt;P&gt;T_Table2:&lt;/P&gt;
&lt;P&gt;LOAD [Policy Num],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Valid From] as [From Date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Responsible Partner]&lt;/P&gt;
&lt;P&gt;FROM 'xxx\list2.xlsx'&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Add a To Date for the interval:&lt;/P&gt;
&lt;P&gt;Intervals:&lt;/P&gt;
&lt;P&gt;LOAD [Policy Num],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If([Policy Num] = Previous([Policy Num]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Previous([From Date]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Today()) as [To Date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [From Date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Responsible Partner]&lt;/P&gt;
&lt;P&gt;Resident T_Table2&lt;/P&gt;
&lt;P&gt;Order by [Policy Num], [From Date] DESC;&lt;/P&gt;
&lt;P&gt;DROP Table T_Table2;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;let path_Alles = 'xxx\*.xlsx';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for each File in filelist (path_Alles)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FindHeaderTemp:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as DataStart&lt;/P&gt;
&lt;P&gt;FROM $(File)&lt;/P&gt;
&lt;P&gt;(ooxml, no labels)&lt;/P&gt;
&lt;P&gt;WHERE A = 'Policy Number';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vHeaderSize = peek('DataStart') - 1;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE FindHeaderTemp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;AllData:&lt;/P&gt;
&lt;P&gt;LOAD [Policy Number] as Policy,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Client,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fees,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Commission (incl. VAT)] as Commission,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Premium,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Provider X' as Provider,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(SubField(SubField(SubField('$(File)','.',-2),'\',-1),' - ',1), 'YYYYMMDD')) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(SubField(SubField(SubField('$(File)','.',-2),'\',-1),' - ',1), 'YYYYMMDD'),'YYYYMM') as Period,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(SubField(SubField('$(File)','.',-2),'\',-1),' - ',2) as [PMT Bank],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(SubField(SubField(SubField('$(File)','.',-2),'\',-1),' - ',3),'&amp;amp;',1) as [PMT Ref 1],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(SubField(SubField(SubField('$(File)','.',-2),'\',-1),' - ',3),'&amp;amp;',2) as [PMT Ref 2]&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; $(File)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (ooxml, embedded labels, header is $(vHeaderSize) lines)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Where Len(Trim([Policy Number])) &amp;gt; 2;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;next File&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IntervalMatch(Date, [Policy])&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD [From Date], [To Date], [Policy Num]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD *&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;Drop Table Intervals;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 07:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278496#M850930</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2017-03-14T07:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Load script table and calculate field using another table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278497#M850931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed there was now two columns for the Policy# in the table: &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[Policy]&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[Policy Num]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 67 and down then suddenly made sense to me and I tweaked it by replacing the rest of the code with the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1489749724377394" jivemacro_uid="_1489749724377394"&gt;
&lt;P&gt;IntervalMatch(Date, [Policy])&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD [From Date], [To Date], [Policy Num] as [Policy]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (AllData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD [Responsible Partner], [From Date], [To Date], [Policy Num] as [Policy]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Resident Intervals;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Intervals;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the load of the INTERVALS table added a new field called Policy Num where I should have renamed the field to match the ALLDATA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second load was just to add the responsible partner to the ALLDATA table - I can probably drop the [To Date] and I will still get the same result. Let me know if you think there is a quicker way (ALLDATA will grow by about 50k items a month).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for helping @Jonathan Dienst&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 11:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-script-table-and-calculate-field-using-another-table/m-p/1278497#M850931</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2017-03-17T11:31:32Z</dc:date>
    </item>
  </channel>
</rss>

