<?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: [SCRIPTING] Calculated field from fields from two tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983629#M335735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that sometimes i dont have values for fields in Collection table, because the client didnt pay the bill, do you think that INNER JOIN is the way? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Oct 2015 11:38:24 GMT</pubDate>
    <dc:creator>jumiprado</dc:creator>
    <dc:date>2015-10-02T11:38:24Z</dc:date>
    <item>
      <title>[SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983622#M335728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys! I need to make differents calculated fields in the script@ from two tables (Billing and Collection)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; width: 73px; height: 139px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Billing&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ClientID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bill_ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Period&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bill_Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Date_Billing&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I give an example for BILLING table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ClientID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Bill_ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Period&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Amount&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Bill_Type&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date_Billing&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BILL_0001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;May-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Bill&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01-05-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BILL_5030&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Apr-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Bill&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04-04-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Bill_5043&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Apr-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Credit Note&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;06-04-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BILL_6074&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jun-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Bill&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;07-06-2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; width: 94px; height: 86px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Collection&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ClientID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;PaymentID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Period&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Payment_Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Date_Collection&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ClientID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;PaymentID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Period&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Payment_Type&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date_Collection&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;P_3059&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;May-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;80&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Payment&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04-05-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;P_5492&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Apr-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Payment&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;07-04-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;P_8765&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jun-2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Payment&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;14-06-2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I Need to make fields with differents calculations Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="174" style="border: 1px solid rgb(0, 0, 0); width: 469px; height: 136px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Calculation_Fields_Table&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ClientID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Amount (From Billing) - Amount (from Collection) = DEBT_FIELD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Date_Billing - Date_Collection = #_of_Days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;If(Bill_Type="Credit Note", 1) as #_Of_CreditNotes_Billing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If(Payment_Type="Credit Note", 1) as #_Of_CreditNotes_Collection&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create, if it is possible, a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; width: 538px; height: 76px;" width="565"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ClientID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;DEBT_FIELD&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;#_of_Days&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; #_Of_CreditNotes_Billing&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;#_Of_CreditNotes_Collection&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline; background-color: rgba(0, 0, 0, 0);"&gt;Client_001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline; background-color: rgba(0, 0, 0, 0);"&gt;20&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline; background-color: rgba(0, 0, 0, 0);"&gt;3 (days)&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline; background-color: rgba(0, 0, 0, 0);"&gt;0&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline; background-color: rgba(0, 0, 0, 0);"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3 (days)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7 (days)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;STRONG&gt;I think it's better to relate the tables by the ClientID field more than concatenate because i have a table Clients, but would like to help me solve this problem in the best possible option.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;The table CLIENT is similar to this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid #000000; width: 105px; height: 59px;" width="103"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Clients&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ClientID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_Age&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Client_Birthday&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for this help!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 03:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983622#M335728</guid>
      <dc:creator>jumiprado</dc:creator>
      <dc:date>2015-10-02T03:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983623#M335729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this, share sample data if you find any trouble in using it -&lt;/P&gt;&lt;P&gt;Billing:&lt;/P&gt;&lt;P&gt;Load ClientID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bill_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Amount as Bill_Amount,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bill_Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date_Billing&lt;/P&gt;&lt;P&gt;From &amp;lt;Your Billing file&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inner join(Billing)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Collection:&lt;/P&gt;&lt;P&gt;Load ClientID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PaymentID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Period as Collection_Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Amount as Coll_Amount,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Payment_Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date_Collection&lt;/P&gt;&lt;P&gt;From &amp;lt;Your Collection File&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculation_Field_Table:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; #_Of_CreditNotes_Billing - #_Of_CreditNotes_Collection as #_of_CreditNotes;&lt;/P&gt;&lt;P&gt;Load ClientID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bill_Amount-Coll_Amount as DEBT_FIELD,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date_Billing-Date_Collection as [# of days],&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Bill_Type='Credit Note',1) as #_Of_CreditNotes_Billing,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Payment_Type='Credit Note',1) as #_Of_CreditNotes_Collection&lt;/P&gt;&lt;P&gt;Resident Billing;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 03:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983623#M335729</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T03:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983624#M335730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #000000; font-size: 1.1em; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Digvijay Singh do you think that INNER JOIN is better than relate the tables ? I tried something like this but with a LEFT JOIN,&amp;nbsp; but when i make a simple table in qlikview the total is wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #000000; font-size: 1.1em; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #000000; font-size: 1.1em; font-style: inherit; font-family: inherit;"&gt;If I have a problem i am going to tell here!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #000000; font-size: 1.1em; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #000000; font-size: 1.1em; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Thank You a lot!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding-right: 3px; color: #3778c7; font-size: 1.1em; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;A href="https://community.qlik.com/qlik-users/189406"&gt;Digvijay&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 03:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983624#M335730</guid>
      <dc:creator>jumiprado</dc:creator>
      <dc:date>2015-10-02T03:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983625#M335731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think inner join is must here because if you use left join you may have records with only billing information if there is no collection record with same client_Id.&lt;/P&gt;&lt;P&gt;Using Inner join we will have only records having both billing and collection information because your calculation table requirement makes sense only when you have both billing and collection data for one client_id.&lt;/P&gt;&lt;P&gt;Also you may need to ensure your dates are in proper date format else you won't get no of days right, use Date(Date# functions to format them properly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 04:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983625#M335731</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T04:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983626#M335732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can share sample data, I think I can verify the script shared.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 04:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983626#M335732</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T04:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983627#M335733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would almost certainly concatenate the billings and collections into a single table. It will greatly simplify your front end analysis and avoid the need for links tables and/or multiple calendars as well as probable improvement in load and front end performance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Transactions:&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;&amp;nbsp; ClientID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Bill_ID As DocID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Period&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Amount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Bill_Type As TransType&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Date_Billing As TransDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 'Billing' As Source&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM Billing......;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate (Transactions)&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;&amp;nbsp; ClientID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; PaymentID As DocID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Period&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Amount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Payment_Type As TransType&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Date_Collection As TransDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 'Payments' As Source&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM Payments.......;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Clients:&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;&amp;nbsp; ClientID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Client_Name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Client_Age&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Client_Birthday&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM Clients.....;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 05:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983627#M335733</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-10-02T05:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983628#M335734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="100730" alt="t1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100730_t1.png" style="height: 678px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;(Script attached)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 05:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983628#M335734</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-10-02T05:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983629#M335735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that sometimes i dont have values for fields in Collection table, because the client didnt pay the bill, do you think that INNER JOIN is the way? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 11:38:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983629#M335735</guid>
      <dc:creator>jumiprado</dc:creator>
      <dc:date>2015-10-02T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: [SCRIPTING] Calculated field from fields from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983630#M335736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest trying concatenation as suggested by &lt;A href="https://community.qlik.com/qlik-users/13229"&gt;jontydkpi&lt;/A&gt; which may help in handling multiple scenarios existing in your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner join will exclude billing client_id if you don't have corresponding collection_id. it will only filter records with both billing and collection record existing for a specific client_ID. You may go for left join as I suppose you would always want to keep billing record in final joined table.As I know you cannot have collection record without any billing record so left join is fine for that. But I prefer trying on good sample as there could be other scenarios like more than one collection record for one billing record. Left join will create multiple records for one client ID and multiple collection record so we may need group by Client_ID to get integrated information for one client Id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try or share sample data to verify the solutions provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 17:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCRIPTING-Calculated-field-from-fields-from-two-tables/m-p/983630#M335736</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T17:26:42Z</dc:date>
    </item>
  </channel>
</rss>

