<?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: How do I do derived calculations across multiple data sources? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386103#M144214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample step-by-step of joining the two tables, performing the calculation, and dropping the old table. Note that in my file I am using Inline loads in order to provide a very small amount of data as a sample; yours would load from the files as usual. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2012 18:14:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-30T18:14:26Z</dc:date>
    <item>
      <title>How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386102#M144213</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;First time user, evaluating the product.&amp;nbsp; I am trying to import a bunch of values from two spreadsheets linked by a single key field.&amp;nbsp; I want to subtract X in source 1 from Y in source 2 to result in a derived value.&amp;nbsp; I haven't been able to find guidance on how to do this or examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I need to do this in the load script, rather than in the GUI anywhere.&amp;nbsp; I've seen examples of how to do this when I am using one file, but not two.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 17:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386102#M144213</guid>
      <dc:creator />
      <dc:date>2012-10-30T17:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386103#M144214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample step-by-step of joining the two tables, performing the calculation, and dropping the old table. Note that in my file I am using Inline loads in order to provide a very small amount of data as a sample; yours would load from the files as usual. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 18:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386103#M144214</guid>
      <dc:creator />
      <dc:date>2012-10-30T18:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386104#M144215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case you are using personal edition, here is a snapshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24425" class="jive-image-thumbnail jive-image" onclick="" alt="SAMPLE.JPG" src="https://community.qlik.com/legacyfs/online/24425_SAMPLE.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The script:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24426" class="jive-image" alt="SAMPLE 2.JPG" src="/legacyfs/online/24426_SAMPLE 2.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 18:16:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386104#M144215</guid>
      <dc:creator />
      <dc:date>2012-10-30T18:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386105#M144216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help, works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 09:52:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386105#M144216</guid>
      <dc:creator />
      <dc:date>2012-10-31T09:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386106#M144217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help, works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 09:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386106#M144217</guid>
      <dc:creator />
      <dc:date>2012-10-31T09:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386107#M144218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually while this worked with two files, it doesn't seem to work with a file joined to a database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;BR /&gt;SET TimeFormat='hh:mm:ss';&lt;BR /&gt;SET DateFormat='DD/MM/YYYY';&lt;BR /&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;BR /&gt;prod:&lt;BR /&gt;LOAD TRADE_ID, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE as productionValue&lt;BR /&gt;FROM&lt;BR /&gt;[\\dbg.ads.db.com\LON-USERS-U\VF01_USERS01\smitada\config\Desktop\export1.xls]&lt;BR /&gt;(biff, embedded labels, table is [Export Worksheet$]);&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [nygrimsd;DBQ=nygrimsd] (XUserId is TdNEbTJOJLbSWZdLSLZGWXZNGLaOWPVOTLZEXYD, XPassword is McaORKNKfKYGWRdNVTbIXYMG);&lt;BR /&gt;SQL SELECT trade_id, value&lt;BR /&gt;FROM VERTEX_REPORT.REPORT&lt;BR /&gt;WHERE RISK_GROUP LIKE 'DBNY_FIXED1%' &lt;BR /&gt;AND REPORT_NAME = 'PRICE_COB'&lt;BR /&gt;AND BUSINESS_DATE = '26-OCT-12'&lt;BR /&gt;and trade_id = 'N595709N';&lt;/P&gt;&lt;P&gt;derived:&lt;BR /&gt;LOAD&amp;nbsp; TRADE_ID, Round(productionValue - value) as pvImpact&lt;BR /&gt;Resident prod;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&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;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I had problems with having a name: before the ODBC keyword (as you have with TableOne in the example above).&amp;nbsp; The syntax checker did not like it.&amp;nbsp; When I run the script I get the following error:&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;STRONG&gt;Field not found - &amp;lt;value&amp;gt;&lt;A&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;derived:&lt;A&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&amp;nbsp; TRADE_ID, Round(productionValue - value) as pvImpact&lt;A&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident prod&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help?&lt;BR id="mce_10" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 16:32:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386107#M144218</guid>
      <dc:creator />
      <dc:date>2012-10-31T16:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I do derived calculations across multiple data sources?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386108#M144219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It isn't working because you are trying to tell it to pull both productionValue and value fields from the prod table, and value is not there.&amp;nbsp; Where you are pulling in trade_id and value, you must join, concatenate, etc. in order to get it in to the prod table.&amp;nbsp; One other thing to note is that everything is case-sensitive.&amp;nbsp; I noticed that you have TRADE_ID and trade_id.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 16:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-do-derived-calculations-across-multiple-data-sources/m-p/386108#M144219</guid>
      <dc:creator />
      <dc:date>2012-10-31T16:53:17Z</dc:date>
    </item>
  </channel>
</rss>

