<?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: Using calculated fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351880#M130514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Michael - I don't agree!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was under the impression that LEFT JOINS were relatively inefficient in QlikView as it loads the whole second table before deciding what to join and keep. I might be wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I hardly ever recommend calculating in the front end instead of the script if the calculation isn't dependent upon current selections.&amp;nbsp; You end up with unneccesarily complicated expressions and place uneeded overhead on the server. The only time I can see this being an advantage is if the extra script work would increase script run time and you had an overly tight reload window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally - Stefan's preceding load script seems to be the shortest of all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 10:47:52 GMT</pubDate>
    <dc:creator>Jason_Michaelides</dc:creator>
    <dc:date>2012-05-15T10:47:52Z</dc:date>
    <item>
      <title>Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351874#M130508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as a newcomer to QLIKVIEW, I have a special problem in using the Load-Command. With the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD X, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X*Y*Z as PRO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X+Y+Z as SU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;m3.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to read some random numbers (X, Y, Z) from an Excel chart; the field PRO und SU are calculated, and this works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD X, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X*Y*Z as PRO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X+Y+Z as SU,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; TEST as PRO*SU&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;m3.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;an error occurs (field&lt;STRONG&gt; TEST&lt;/STRONG&gt; not found). My question ist: is it generally not possible to refer to calculated fields while loading data from a file in this way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards! WS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351874#M130508</guid>
      <dc:creator />
      <dc:date>2012-05-15T10:07:43Z</dc:date>
    </item>
    <item>
      <title>Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351875#M130509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PRO*SU as TEST&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Calculating the new field TEST from PRO and SU?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is also not possible, since the fields PRO and SU are not known in the input table. You need to use a preceding load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, PRO*SU as TEST;&lt;/P&gt;&lt;P&gt;LOAD X,Y,Z,X*Y*Z as PRO, Y+X+Z as SU from ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use the full expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;X,Y,Z,X*Y*Z as PRO, Y+X+Z as SU, X*Y*Z *( X+Y+Z) as TEST from...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351875#M130509</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-15T10:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351876#M130510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PRO and SU don't exist as fields yet so you can't use them to calculate TEST.&amp;nbsp; 2 options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD X, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X*Y*Z as PRO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X+Y+Z as SU,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (X*Y*Z) * (X+Y+Z)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;m3.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data_temp:&lt;/P&gt;&lt;P&gt;LOAD X, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X*Y*Z as PRO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X+Y+Z as SU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;m3.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRO * SU&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEST&lt;/P&gt;&lt;P&gt;RESIDENT Data_temp;&lt;/P&gt;&lt;P&gt;DROP TABLE Data_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351876#M130510</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-05-15T10:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351877#M130511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, this works fine! Kind regards! WS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:20:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351877#M130511</guid>
      <dc:creator />
      <dc:date>2012-05-15T10:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351878#M130512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, this works fine! Kind regards! WS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:20:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351878#M130512</guid>
      <dc:creator />
      <dc:date>2012-05-15T10:20:23Z</dc:date>
    </item>
    <item>
      <title>Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351879#M130513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; One more version, with shorter script:&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD &lt;BR /&gt; X, &lt;BR /&gt; Y, &lt;BR /&gt; Z,&lt;BR /&gt; X*Y*Z as PRO,&lt;BR /&gt; X+Y+Z as SU&lt;BR /&gt;FROM m3.xlsx (ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;LEFT JOIN (Data) LOAD&lt;BR /&gt; X,Y,Z,&lt;BR /&gt; PRO * SU AS TEST&lt;BR /&gt;RESIDENT Data;&lt;/P&gt;&lt;P&gt;But best of all, in most cases - just load X, Y, and Z, and calculate expressions on the front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:22:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351879#M130513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T10:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351880#M130514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Michael - I don't agree!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was under the impression that LEFT JOINS were relatively inefficient in QlikView as it loads the whole second table before deciding what to join and keep. I might be wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I hardly ever recommend calculating in the front end instead of the script if the calculation isn't dependent upon current selections.&amp;nbsp; You end up with unneccesarily complicated expressions and place uneeded overhead on the server. The only time I can see this being an advantage is if the extra script work would increase script run time and you had an overly tight reload window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally - Stefan's preceding load script seems to be the shortest of all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 10:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351880#M130514</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-05-15T10:47:52Z</dc:date>
    </item>
    <item>
      <title>Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351881#M130515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not going to argue with you at this thread - it is closed anyway.&amp;nbsp; Just two points:&lt;BR /&gt;1. You missed my "qualifier": &lt;STRONG&gt;in most cases&lt;/STRONG&gt;.&amp;nbsp; Your consideration are applicable in cases where front end perfomance is at risk, that doesn't happen "in most cases", at least not in my world.&amp;nbsp;&amp;nbsp; Besides, in this specific situation these expressions do depend on selections, and don't add any value but add extra data, hence application size.&lt;BR /&gt;2. Author mentioned that he was a newcomer.&amp;nbsp; I think it is important for a new person to start from the basics, learning what Qlikview is about and what is the right way of using it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 23:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351881#M130515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-16T23:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated fields</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351882#M130516</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that my question did not initiate any trouble. I was very happy having help within - literally!!! - a few minutes. I have worked out the first proposal (using preceding loads),  and it is really bombastic. Loading 1,95 Mio. lines, each with 9 decimal values, from a model file calculated in Mathematica, and calculating additional 10 fields in Qlikview takes about 14 seconds on an actual Notebook PC under Windows 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you should wonder what this is useful for: I developed an OR model, representing various scenarios that can occur in the economic situation of an industrial plant I am working at. There are 9 independent dimensions to regard, each of which has 5 variations, this is why I have to deal with 1,95 Mio. lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 07:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-fields/m-p/351882#M130516</guid>
      <dc:creator />
      <dc:date>2012-05-17T07:26:18Z</dc:date>
    </item>
  </channel>
</rss>

