<?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: Evaluate formulas inside Load script calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998097#M339440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help and&amp;nbsp; provide the correct ways of evaluating the formulas inside script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2015 11:50:14 GMT</pubDate>
    <dc:creator>aj0031724</dc:creator>
    <dc:date>2015-09-24T11:50:14Z</dc:date>
    <item>
      <title>Evaluate formulas inside Load script calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998095#M339438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;While evaluating the formula inside load script it is giving an error Ïnvalid expression"".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to evaluate the&amp;nbsp; formulas inside load script for the attached qvw AND THE ATTACHED EXCEL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 08:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998095#M339438</guid>
      <dc:creator>aj0031724</dc:creator>
      <dc:date>2015-09-22T08:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate formulas inside Load script calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998096#M339439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You use a variable called KPIFORMULAS: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; UTRANCELLKEY:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(KPIFORMULAS) AS RESULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; FROM [...] ...&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this variable does not exist. You have a field - from a previous data load - but this cannot be used this way. You need to assign a variable this value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, if you do, it will still not work since your Sum() function needs a Group By clause in the Load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998096#M339439</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-22T11:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate formulas inside Load script calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998097#M339440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help and&amp;nbsp; provide the correct ways of evaluating the formulas inside script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 11:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998097#M339440</guid>
      <dc:creator>aj0031724</dc:creator>
      <dc:date>2015-09-24T11:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate formulas inside Load script calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998098#M339441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say that you have an Excel sheet with two columns: Variable name and variable formula. Then you can use this in something similar to the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variables:&lt;/P&gt;&lt;P&gt;LOAD VariableName, VariableValue &lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM "File.xls" (biff, embedded labels, table is Sheet2$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For vRowNo = 0 to NoOfRows('Variables')-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vVariableName = Peek('VariableName',vRowNo,'Variables');&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let $(vVariableName) = Peek('VariableValue',vRowNo,'Variables');&lt;/P&gt;&lt;P&gt;Next vRowNo &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load *, $(xyz) as Field&lt;/P&gt;&lt;P&gt;&amp;nbsp; From "SourceData.xls" (...) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words: Load all variables into a table; then loop over this table and create a new variable in each loop. Finally you can use these variables (like the variable xyz in the example above) to define new fields in your load statements. But you cannot have formulas with aggregation functions (like Sum or Count), unless you have a "Group By" in your load statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use these variables in the UI to define measures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 13:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-formulas-inside-Load-script-calculation/m-p/998098#M339441</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-24T13:42:29Z</dc:date>
    </item>
  </channel>
</rss>

