<?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: Loading calculations from excel or load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546689#M439912</link>
    <description>WHy you are not doing that calculation in expression?</description>
    <pubDate>Wed, 20 Feb 2019 06:58:01 GMT</pubDate>
    <dc:creator>Shubham_Deshmukh</dc:creator>
    <dc:date>2019-02-20T06:58:01Z</dc:date>
    <item>
      <title>Loading calculations from excel or load script</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546645#M439909</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am hoping there is a way to do this. I am trying to load calculation from excel or even the load script&lt;BR /&gt;but when I add the field to the measure column it just displays the text and doesn't evaluate.&lt;BR /&gt;My sample code is below + the output am getting.Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transactions:&lt;BR /&gt;Load * Inline [Code,Value,Position,Date&lt;BR /&gt;b230s,500,1,18/02/2019&lt;BR /&gt;bd43p,700,2,18/02/2019&lt;BR /&gt;bv891,350,3,18/02/2019&lt;BR /&gt;b230s,1000,1,20/02/2019&lt;BR /&gt;bd43p,1400,2,20/02/2019&lt;BR /&gt;bv891,700,3,20/02/2019&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Dims:&lt;BR /&gt;Load *,Code as Key;&lt;BR /&gt;Load * Inline [Code,Desc&lt;BR /&gt;b230s,Chair&lt;BR /&gt;bd43p,Table&lt;BR /&gt;bv891,Fan&lt;BR /&gt;bb232,TV&lt;BR /&gt;BN656,Home&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Calculation:&lt;BR /&gt;Load * Inline [Key,Calc&lt;BR /&gt;b230s ,Sum(Value)&lt;BR /&gt;bd43p ,Sum(Value)&lt;BR /&gt;bv891 ,Sum(Value)&lt;BR /&gt;bb232 ,Sum({&amp;lt;Key={'bv891'}&amp;gt;}Value)+Sum({&amp;lt;Key={'bd43p'}&amp;gt;}Value)&lt;BR /&gt;BN656 ,Sum({&amp;lt;Key={'b230s'}&amp;gt;}Value)-Sum({&amp;lt;Key={'bd43p'}&amp;gt;}Value)&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.png" style="width: 899px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6369i2F1BDDF7E3AE1903/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.png" alt="error.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546645#M439909</guid>
      <dc:creator>ericdelaqua</dc:creator>
      <dc:date>2024-11-16T04:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loading calculations from excel or load script</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546648#M439910</link>
      <description>&lt;P&gt;Cause Qlik reading those calculation as field. For your data, you don't have to do any calculation in load script. Just load the data from excel and then do the calculation in chart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 03:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546648#M439910</guid>
      <dc:creator>saifuddin</dc:creator>
      <dc:date>2019-02-20T03:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loading calculations from excel or load script</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546689#M439912</link>
      <description>WHy you are not doing that calculation in expression?</description>
      <pubDate>Wed, 20 Feb 2019 06:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546689#M439912</guid>
      <dc:creator>Shubham_Deshmukh</dc:creator>
      <dc:date>2019-02-20T06:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loading calculations from excel or load script</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546695#M439914</link>
      <description>&lt;P&gt;It will not be evaluated in script as it is behaving like a column. Moreover you need to write set expressions in chart expression.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 07:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546695#M439914</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2019-02-20T07:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading calculations from excel or load script</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546715#M439920</link>
      <description>&lt;P&gt;Your approach won't work because Qlik doesn't evaluate the Calc field as expressions else they are just strings. The only way to get such an expression-string to be evaluated is to wrap it with a $-sign expansion like: $(= Calc) but this creates an adhoc-variable and a variable could have just one content at the same moment and this means the first finding of Calc will be evaluated and applied for all rows.&lt;/P&gt;&lt;P&gt;The only way to apply different expressions for the various rows in an object is querying each dimension-value and return the wished calculation. In simpler scenarios this might be a nested if-loop and by more complex situations a pick(match()) would be more appropriate, like:&lt;/P&gt;&lt;P&gt;pick(match(Dim, 'val1', 'val2', ...), expr1, expr2, ...)&lt;/P&gt;&lt;P&gt;whereby both the dimension- as well as the expression-list might be the content of a table and called with a $-sign expansion like:&lt;/P&gt;&lt;P&gt;$(=concat(Dim, ','))&lt;/P&gt;&lt;P&gt;The main-logic here is simple but depending on the content the return-list might need some extra quoting like:&lt;/P&gt;&lt;P&gt;'$(=concat(Dim, chr(39) &amp;amp; ',' &amp;amp; chr(39)))'&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 08:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-calculations-from-excel-or-load-script/m-p/1546715#M439920</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-20T08:01:42Z</dc:date>
    </item>
  </channel>
</rss>

