<?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 Calculated field in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377465#M420367</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;I have 2 SQL Select statements from an oracle db in a script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a calcuated field based on values from each of the 2 seperate SQL scripts.&amp;nbsp; I know how to do this as a calculated dimension, but I'd like to use it in multiple objects in the report, so would prefer to put it into the load or have as some sort of global calculated dimesion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Oct 2017 19:43:30 GMT</pubDate>
    <dc:creator>reddwarfcrew</dc:creator>
    <dc:date>2017-10-16T19:43:30Z</dc:date>
    <item>
      <title>Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377465#M420367</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;I have 2 SQL Select statements from an oracle db in a script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a calcuated field based on values from each of the 2 seperate SQL scripts.&amp;nbsp; I know how to do this as a calculated dimension, but I'd like to use it in multiple objects in the report, so would prefer to put it into the load or have as some sort of global calculated dimesion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 19:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377465#M420367</guid>
      <dc:creator>reddwarfcrew</dc:creator>
      <dc:date>2017-10-16T19:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377466#M420368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post here an example? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377466#M420368</guid>
      <dc:creator>JaMajka1</dc:creator>
      <dc:date>2017-10-16T20:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377467#M420369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main:&lt;/P&gt;&lt;P&gt;SQL SELECT ID, Value FROM Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supp:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SQL SELECT ID, Volume FROM Table2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I'd like to add a calculated field that is Value * Volume.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The actual SQL for each is a lot more complex so I can't easily join the 2 queries into 1 SQL statement and perform the calculation in the 1 SQL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377467#M420369</guid>
      <dc:creator>reddwarfcrew</dc:creator>
      <dc:date>2017-10-16T20:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377468#M420370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would prefer to load these two tables separatly from SQL and calculate the Value*Volume in Qlik load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;[data]:&lt;/P&gt;&lt;P&gt;SQL Select ID, Value From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join (data) // or another type of join&lt;/P&gt;&lt;P&gt;SQL Select ID, Volume From Table 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;[final]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Value*Volume as Measure&lt;/P&gt;&lt;P&gt;Resident data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377468#M420370</guid>
      <dc:creator>JaMajka1</dc:creator>
      <dc:date>2017-10-16T20:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377469#M420371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I've tried that but the script fails with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field not found &amp;lt;ID&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 20:58:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377469#M420371</guid>
      <dc:creator>reddwarfcrew</dc:creator>
      <dc:date>2017-10-16T20:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377470#M420372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you paste your error window as a snapshot here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 21:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377470#M420372</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-16T21:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377471#M420373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Main:&lt;/P&gt;&lt;P&gt;SQL SELECT ID, Value FROM Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supp:&lt;/P&gt;&lt;P&gt;LOAD *,Lookup('Value','ID',ID,'Main')*Volume as NewField;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.33px;"&gt;SQL SELECT ID, Volume FROM Table2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.33px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 22:11:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377471#M420373</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-10-16T22:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377472#M420374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that in your SQL tables does the field ID exist?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 05:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377472#M420374</guid>
      <dc:creator>JaMajka1</dc:creator>
      <dc:date>2017-10-17T05:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377473#M420375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in my SQL it is SQL Select bt.OBJID as ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do I need to refer to bt.OBJID?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 08:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377473#M420375</guid>
      <dc:creator>reddwarfcrew</dc:creator>
      <dc:date>2017-10-17T08:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377474#M420376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, you need to use the same name as it is in the DB. Do you want to also rename the field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;NoConcatenate&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;[data]:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;SQL Select OBJID, Value From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Left join (data) // or another type of join&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;SQL Select OBJID, Volume From Table 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;NoConcatenate&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;[final]:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;OBJID,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // or OBJID as ID, if you want to rename the field&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Value*Volume as Measure&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Resident data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Drop table data;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 10:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377474#M420376</guid>
      <dc:creator>JaMajka1</dc:creator>
      <dc:date>2017-10-17T10:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377475#M420377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally sussed the problem.&amp;nbsp; For some reason, the script didn't like the field name having an _ in it.&amp;nbsp; I renamed the field to remove the _ and it worked!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 17:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field-in-script/m-p/1377475#M420377</guid>
      <dc:creator>reddwarfcrew</dc:creator>
      <dc:date>2017-10-17T17:40:33Z</dc:date>
    </item>
  </channel>
</rss>

