<?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 Computing Age across tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019719#M638805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables, one with personal information, like data of birth.&amp;nbsp; And another table with transaction date.&amp;nbsp; They can be joined via a Cust_ID.&amp;nbsp; Is there a way, during the load process to computer the difference in these two dates for a customer for all of her or his corresponding transactions?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, I want the age of a person at the time of the transaction, but the two dates are in different tables and doing the age calculation at the time of displaying the chart is unacceptably slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Feb 2016 15:35:20 GMT</pubDate>
    <dc:creator>dwfiv327</dc:creator>
    <dc:date>2016-02-24T15:35:20Z</dc:date>
    <item>
      <title>Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019719#M638805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables, one with personal information, like data of birth.&amp;nbsp; And another table with transaction date.&amp;nbsp; They can be joined via a Cust_ID.&amp;nbsp; Is there a way, during the load process to computer the difference in these two dates for a customer for all of her or his corresponding transactions?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, I want the age of a person at the time of the transaction, but the two dates are in different tables and doing the age calculation at the time of displaying the chart is unacceptably slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 15:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019719#M638805</guid>
      <dc:creator>dwfiv327</dc:creator>
      <dc:date>2016-02-24T15:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019720#M638806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you join load the two tables, you will get a single table. Then you can calculate the date differences.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 17:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019720#M638806</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-02-24T17:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019721#M638807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Didn’t work.  Here is a snippet of my code.  What it gets to the line with ContactAge, I get an error message about not finding birthday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD CustomerID,&lt;/P&gt;&lt;P&gt;    Birthday,&lt;/P&gt;&lt;P&gt;    age(today(),Birthday) as CustAge,&lt;/P&gt;&lt;P&gt;    Year(Birthday) as BirthYear,&lt;/P&gt;&lt;P&gt;    date(Birthday) as dob,&lt;/P&gt;&lt;P&gt;    IDType2;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM PersonalInfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Join&lt;/P&gt;&lt;P&gt;LOAD SessionID,&lt;/P&gt;&lt;P&gt;    CustomerID,&lt;/P&gt;&lt;P&gt;    date(SessionDate) as SessDate,&lt;/P&gt;&lt;P&gt;    age(SessionDate, Birthday) as ContactAge,&lt;/P&gt;&lt;P&gt;    Reason;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Session;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel W. Farrow, IV&lt;/P&gt;&lt;P&gt;DISCLAIMER: This e-mail and any files transmitted with it may contain confidential and/or proprietary information.  It is intended solely for the use of the individual or entity who is the intended recipient.  Unauthorized use of this information is prohibited.  If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 17:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019721#M638807</guid>
      <dc:creator>dwfiv327</dc:creator>
      <dc:date>2016-02-24T17:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019722#M638808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try just joining the 2 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the resulting single table. I suspect that you can't calculate the age until after the tables are joined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019722#M638808</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-02-24T18:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019723#M638809</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;one solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_206869_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/115848_QlikCommunity_Thread_206869_Pic1.JPG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_206869_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/115849_QlikCommunity_Thread_206869_Pic2.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14563542340531172" jivemacro_uid="_14563542340531172"&gt;
&lt;P&gt;tabPersonalInfo:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as CustomerID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MakeDate(1950)+Ceil(10000*Rand())) as Birthday&lt;/P&gt;
&lt;P&gt;AutoGenerate 10;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabSession:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as SessionID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*10) as CustomerID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Today()-Ceil(Rand()*5000)) as SessionDate&lt;/P&gt;
&lt;P&gt;AutoGenerate 50;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (tabSession)&lt;/P&gt;
&lt;P&gt;LOAD CustomerID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Birthday&lt;/P&gt;
&lt;P&gt;Resident tabPersonalInfo;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (tabSession)&lt;/P&gt;
&lt;P&gt;LOAD Distinct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Birthday,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SessionDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age(SessionDate,Birthday) as ContactAge&lt;/P&gt;
&lt;P&gt;Resident tabSession;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Field Birthday From tabSession;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 22:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019723#M638809</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-02-24T22:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Computing Age across tables</title>
      <link>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019724#M638810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another possible solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14563548242827225" jivemacro_uid="_14563548242827225"&gt;
&lt;P&gt;tabPersonalInfo:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as CustomerID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MakeDate(1950)+Ceil(10000*Rand())) as Birthday&lt;/P&gt;
&lt;P&gt;AutoGenerate 10;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;mapPersBirthday:&lt;/P&gt;
&lt;P&gt;Mapping LOAD * Resident tabPersonalInfo;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabSession:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age(SessionDate,ApplyMap('mapPersBirthday',CustomerID)) as ContactAge;&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as SessionID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*10) as CustomerID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Today()-Ceil(Rand()*5000)) as SessionDate&lt;/P&gt;
&lt;P&gt;AutoGenerate 50;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 23:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Computing-Age-across-tables/m-p/1019724#M638810</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-02-24T23:00:32Z</dc:date>
    </item>
  </channel>
</rss>

