<?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: Calculation during load from resident table data in memory in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509906#M692605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will give days.&amp;nbsp; But you can use interval function for a better formatting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Arrival DateTime] &amp;lt; [Screen DateTime] &lt;/P&gt;&lt;P&gt; and len(trim([Arrival DateTime]) &amp;gt;0 &lt;/P&gt;&lt;P&gt; and len(trim([Screen DateTime]) &amp;gt;0, &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;interval([Screen DateTime] - [Arrival DateTime], 'DD hh:mm') &lt;/STRONG&gt;as Difference,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you get it in days, hours, and minutes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2013 19:58:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-22T19:58:44Z</dc:date>
    <item>
      <title>Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509903#M692602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the situation.... I am about to load data from a resident table, with code like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;[Arrival DateTime],&lt;/P&gt;&lt;P&gt;[Screen DateTime],&lt;/P&gt;&lt;P&gt;[Depart DateTime]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT Temp_ET;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do a date difference in minutes between [Arrival DateTime] and [Screen DateTime] as well during the load...BUT if one of them is null then I want to return null obviously. Also, if for some reason in the data, the [Screen DateTime] is earlier than the [Arrival DateTime], then I also want to return null instead of a negative value. How can I add this calculation into the load?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509903#M692602</guid>
      <dc:creator />
      <dc:date>2013-07-22T19:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509904#M692603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian, this should work (if I got the rules right):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;LOAD&lt;BR /&gt;if([Arrival DateTime] &amp;lt; [Screen DateTime] &lt;BR /&gt; and len(trim([Arrival DateTime]) &amp;gt;0 &lt;BR /&gt; and len(trim([Screen DateTime]) &amp;gt;0, &lt;BR /&gt; [Screen DateTime] - [Arrival DateTime]) as Difference,&lt;BR /&gt;[Arrival DateTime],&lt;BR /&gt;[Screen DateTime],&lt;BR /&gt;[Depart DateTime]&lt;BR /&gt;RESIDENT Temp_ET;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509904#M692603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-22T19:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509905#M692604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this give minutes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509905#M692604</guid>
      <dc:creator />
      <dc:date>2013-07-22T19:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509906#M692605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will give days.&amp;nbsp; But you can use interval function for a better formatting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Arrival DateTime] &amp;lt; [Screen DateTime] &lt;/P&gt;&lt;P&gt; and len(trim([Arrival DateTime]) &amp;gt;0 &lt;/P&gt;&lt;P&gt; and len(trim([Screen DateTime]) &amp;gt;0, &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;interval([Screen DateTime] - [Arrival DateTime], 'DD hh:mm') &lt;/STRONG&gt;as Difference,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you get it in days, hours, and minutes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509906#M692605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-22T19:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509907#M692606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful Michael, but I actually want the actual data to just be the number of minutes as an integer...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 20:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509907#M692606</guid>
      <dc:creator />
      <dc:date>2013-07-22T20:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509908#M692607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case, you can multiply the difference the days by number of minutes in a day, 24*60, no need for interval:&lt;/P&gt;&lt;P&gt;([Screen DateTime] - [Arrival DateTime]) * 24 * 60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that interval can be used too, but use only minutes:&lt;/P&gt;&lt;P&gt;interval([Screen DateTime] - [Arrival DateTime], &lt;STRONG&gt;'mm'&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 20:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509908#M692607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-22T20:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation during load from resident table data in memory</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509909#M692608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;replace the format '&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt; 'DD hh:mm'&lt;/STRONG&gt;' by 'mm': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;interval([Screen DateTime] - [Arrival DateTime], 'mm')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 20:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-during-load-from-resident-table-data-in-memory/m-p/509909#M692608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-22T20:12:30Z</dc:date>
    </item>
  </channel>
</rss>

