<?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: Formula with fields of two tables in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376624#M702430</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;You are correct, both fields need to be in Table1 before you can calculate TotalDays. The way to do it is like this&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Join (Table1)&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysOff&lt;/P&gt;&lt;P&gt;Resident Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join (Table1)&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Days - DaysOff As TotalDays&lt;/P&gt;&lt;P&gt;Resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Field DaysOff from Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2012 13:48:06 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2012-08-09T13:48:06Z</dc:date>
    <item>
      <title>Formula with fields of two tables in script</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376623#M702429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I have a very simple problem.&lt;/P&gt;&lt;P&gt;I have got two tables and want to calculate sth. with one field of each of them. They are connected by the ID.&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;Name&lt;/P&gt;&lt;P&gt;Days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;DaysOff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to subtract Days-DaysOff as a new field in Table1.&lt;/P&gt;&lt;P&gt;So I started like this: &lt;/P&gt;&lt;P&gt;left join (Table1) LOAD ID, Days-DaysOff as TotalDays resident Table2;&lt;/P&gt;&lt;P&gt;I also switched Table1 and Table2 but I dont get it. TotalDays should be a field of Table1. In the best case I do not want to JOIN them. I know this would be a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 13:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376623#M702429</guid>
      <dc:creator>richters</dc:creator>
      <dc:date>2012-08-09T13:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with fields of two tables in script</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376624#M702430</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;You are correct, both fields need to be in Table1 before you can calculate TotalDays. The way to do it is like this&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Join (Table1)&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysOff&lt;/P&gt;&lt;P&gt;Resident Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join (Table1)&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Days - DaysOff As TotalDays&lt;/P&gt;&lt;P&gt;Resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Field DaysOff from Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 13:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376624#M702430</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-08-09T13:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with fields of two tables in script</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376625#M702431</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;totally what I thought, thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 05:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-with-fields-of-two-tables-in-script/m-p/376625#M702431</guid>
      <dc:creator>richters</dc:creator>
      <dc:date>2012-08-10T05:40:55Z</dc:date>
    </item>
  </channel>
</rss>

