<?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: Can I create a calculated field using another calculated field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119649#M899593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Casey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately you cannot refer to calculated fields when creating a new calculated field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your questions:&lt;/P&gt;&lt;OL style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;LI&gt;Can I perform these tasks in the Load Editor?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can! If you created your first calculated field (total_cost_field) in the load script, then you could refer to that field in your expression editor when creating a calculation within the dashboard. Or, you could create both in the load editor. But you would have to recreate the primary calculation in your next calculated field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the load script you would need to create the calculated field. Notice that you need to use a resident load. A resident load is when you load in your data, then do an additional load from that data that is now in memory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Temp]:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldA],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldB],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldC]&lt;/P&gt;&lt;P&gt; FROM [lib://Desktop/Delete.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldA],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldB],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldC],&lt;/P&gt;&lt;P&gt;sum(FieldA + FieldB + FieldC) as Total_Cost_Field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resident Temp&lt;/P&gt;&lt;P&gt; group by FieldA,FieldB,FieldC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If you can't refer to calculated fields in your calculations, do you need to just recreate the primary calculation in your next calculated field? (ex: (fieldX / [&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Sum(fieldA + fieldB + fieldC)] ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dustin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jul 2016 21:06:56 GMT</pubDate>
    <dc:creator>Dustin_Baxa</dc:creator>
    <dc:date>2016-07-21T21:06:56Z</dc:date>
    <item>
      <title>Can I create a calculated field using another calculated field?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119647#M899591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New to Qlik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a simple calculated field in the data manager and want to use that calculation to be used in other calculated fields. The data manager does not recognize the newly created calculated field and I'm unable to use it for further calculated fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First successful calculated field:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(fieldA + fieldB + fieldC) = total_cost_field&lt;/P&gt;&lt;P&gt;2nd desired calculated field:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (fieldX) / total_cost_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've found this info: "You can add calculated fields to manage many cases like this. A calculated field uses an expression to define the result of the field. You can use functions, fields and operators in the expression. &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;You can only refer to fields in the table that you are editing."&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can I perform these tasks in the Load Editor?&lt;/LI&gt;&lt;LI&gt;If you can't refer to calculated fields in your calculations, do you need to just recreate the primary calculation in your next calculated field? (ex: (fieldX / [&lt;SPAN style="font-size: 13.3333px;"&gt;Sum(fieldA + fieldB + fieldC)] )&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119647#M899591</guid>
      <dc:creator>caseyjohnson</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a calculated field using another calculated field?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119648#M899592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to provide a sample of what you have and trying to get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 20:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119648#M899592</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-21T20:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a calculated field using another calculated field?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119649#M899593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Casey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately you cannot refer to calculated fields when creating a new calculated field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your questions:&lt;/P&gt;&lt;OL style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;LI&gt;Can I perform these tasks in the Load Editor?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can! If you created your first calculated field (total_cost_field) in the load script, then you could refer to that field in your expression editor when creating a calculation within the dashboard. Or, you could create both in the load editor. But you would have to recreate the primary calculation in your next calculated field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the load script you would need to create the calculated field. Notice that you need to use a resident load. A resident load is when you load in your data, then do an additional load from that data that is now in memory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Temp]:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldA],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldB],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldC]&lt;/P&gt;&lt;P&gt; FROM [lib://Desktop/Delete.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldA],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldB],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FieldC],&lt;/P&gt;&lt;P&gt;sum(FieldA + FieldB + FieldC) as Total_Cost_Field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resident Temp&lt;/P&gt;&lt;P&gt; group by FieldA,FieldB,FieldC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If you can't refer to calculated fields in your calculations, do you need to just recreate the primary calculation in your next calculated field? (ex: (fieldX / [&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Sum(fieldA + fieldB + fieldC)] ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dustin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119649#M899593</guid>
      <dc:creator>Dustin_Baxa</dc:creator>
      <dc:date>2016-07-21T21:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a calculated field using another calculated field?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119650#M899594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't refer to the calculated field by name at the same level of the LOAD statement, but you can use a preceding load to refer to the field like this. So there is no need to duplicate the primary calculation. Note that you are still restricted to using only fields present in or derived from the single input table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;New:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;Total_Cost_Field * .1 as Tarrif&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; [FieldA],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; [FieldB],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; [FieldC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum(FieldA + FieldB + FieldC) as Total_Cost_Field&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resident Temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;group by FieldA,FieldB,FieldC;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;See&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="http://qlikviewcookbook.com/2014/08/preceding-load-is-elegant/" title="http://qlikviewcookbook.com/2014/08/preceding-load-is-elegant/"&gt;Preceding Load is Elegant | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-create-a-calculated-field-using-another-calculated-field/m-p/1119650#M899594</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-07-21T21:29:05Z</dc:date>
    </item>
  </channel>
</rss>

