<?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: What's wrong with using formula on referenced expressions? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133845#M760044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general you could within a single object refer to another expression by the expression-label or the column(INDEX) - whereby you should rather avoid that the labels are named like existing fields or expressions (it may work in many cases but it could be confusing - for Qlik and yourself - and makes a possible trouble-shooting more difficult). Beside this I'm not sure that you have a label for your column 4 because displaying the expression within the label doesn't mean that a label is existing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you need to add a total-statement within the aggregation if they should ignore all or certain dimension-values like: max(TOTAL Revenue).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your column 3 you need to add an aggr() if you want that your total is the sum of your rows. This means something like: sum(aggr(sum(Revenue)+2), CompanyName)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Aug 2018 07:42:41 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2018-08-30T07:42:41Z</dc:date>
    <item>
      <title>What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133840#M760039</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;Can anyone guide me as what's wrong with my expression calculations in following straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;Table 1&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212139" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212139_Capture.PNG" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;Table 2&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212140" alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/212140_Capture.PNG" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here's what's happening,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I can create some expression based on a metric say &lt;STRONG&gt;Revenue, &lt;/STRONG&gt;e.g. &lt;SPAN style="font-size: 12pt; text-decoration: underline; font-family: 'courier new', courier;"&gt;sum(Revenue)&lt;/SPAN&gt; in &lt;STRONG&gt;Table 1&lt;/STRONG&gt; and max(Revenue) in &lt;STRONG&gt;Table 2&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Next, I am able to successfully get results with basic operations by referencing this new expression&lt;EM&gt; (as [expression] or using labels). &lt;/EM&gt;For example, &lt;SPAN style="font-size: 12pt; text-decoration: underline; font-family: 'courier new', courier;"&gt;[sum(Revenue)] + 2&lt;/SPAN&gt; in &lt;STRONG&gt;Table 1&lt;/STRONG&gt;. All good so far &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/LI&gt;&lt;LI&gt;Problems start as soon as I apply any formula to this newly calculated expression and everything goes haywire? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt; As you can see in column 4 of &lt;STRONG&gt;Table 1&lt;/STRONG&gt; and in column 3 of &lt;STRONG&gt;Table 2 &lt;/STRONG&gt;above that results are not as expected. The results are wrong no matter what function I apply to the referenced expressions.&lt;/LI&gt;&lt;LI&gt;My confusion is that why it's not allowed to apply any formulas to expressions created in charts. Or am i doing something wrong here?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ehsan&lt;/P&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/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133840#M760039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133841#M760040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum(TOTAL(Revenue))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure about 2nd example you looking for...&lt;/P&gt;&lt;P&gt;What you like that max function to do?&lt;/P&gt;&lt;P&gt;Revenue should be max of revenue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 16:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133841#M760040</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2018-08-29T16:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133842#M760041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you are doing anything wrong, just that using the column names like that only works for simple operations (I am happy to be contradicted though). So I would use that to avoid having multiple copies of complex formulae where I then have a difference column (so then you only have to amend the formula in the original column, rather than 2 or more places).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I look the error message on the formula you have says bad field name - suggests for those more complex calculations it wants to work with actual fields rather than columns you have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 16:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133842#M760041</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2018-08-29T16:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133843#M760042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I totally agree and I actually don't refer columns like this. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's just I am using this [ ] referencing here to better explain my query &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 16:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133843#M760042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-29T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133844#M760043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;=Sum(total(field)) //Sum may not require After total qualifier i guess&lt;/P&gt;&lt;P&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;There is already an expression as Max(Rev) so =Rev&amp;gt;=(max(rev))&amp;nbsp; is going to be equal i think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 16:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133844#M760043</guid>
      <dc:creator>tulabandula</dc:creator>
      <dc:date>2018-08-29T16:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with using formula on referenced expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133845#M760044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general you could within a single object refer to another expression by the expression-label or the column(INDEX) - whereby you should rather avoid that the labels are named like existing fields or expressions (it may work in many cases but it could be confusing - for Qlik and yourself - and makes a possible trouble-shooting more difficult). Beside this I'm not sure that you have a label for your column 4 because displaying the expression within the label doesn't mean that a label is existing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you need to add a total-statement within the aggregation if they should ignore all or certain dimension-values like: max(TOTAL Revenue).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your column 3 you need to add an aggr() if you want that your total is the sum of your rows. This means something like: sum(aggr(sum(Revenue)+2), CompanyName)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 07:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-using-formula-on-referenced-expressions/m-p/133845#M760044</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-08-30T07:42:41Z</dc:date>
    </item>
  </channel>
</rss>

