<?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 Get value from expression rather than expression itself in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371307#M493679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While trying to figure out this issue:&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/213815"&gt;http://community.qlik.com/message/213815&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to at least get it working on ID level (where the Multiplier_2 field will always be the same). So the idea was that I would make a separate expression where I work out the Multipler_2 value (using Max or Avg) for the Date_From and then use the result of the expression when working out my calculation using Date_To. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My assumption previously was that if you have an expression (let's call it Expression_1) which contains&lt;/P&gt;&lt;P&gt;=Avg(Value_1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you want to use it in a new expression (Expression_2) within the same pivot table which contains&lt;/P&gt;&lt;P&gt;=Sum(Value_2 * Expression_1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then Expression_2 will take the result of Expression_1 rather than resolving the expression within Expression_2 to be a combination of the two expressions which would be like this&lt;/P&gt;&lt;P&gt;=Sum(Value_2 * Avg(Value_1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think that it must be the latter, as when I try and implement this method the expression just fails to resolve and returns Null over all rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So does anyone know how I could put Expression_1 into Expression_2 as the result of the expression rather than resolving Expression_1 within Expression_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this wasn't too confusing &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2012 02:44:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-27T02:44:10Z</dc:date>
    <item>
      <title>Get value from expression rather than expression itself</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371307#M493679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While trying to figure out this issue:&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/213815"&gt;http://community.qlik.com/message/213815&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to at least get it working on ID level (where the Multiplier_2 field will always be the same). So the idea was that I would make a separate expression where I work out the Multipler_2 value (using Max or Avg) for the Date_From and then use the result of the expression when working out my calculation using Date_To. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My assumption previously was that if you have an expression (let's call it Expression_1) which contains&lt;/P&gt;&lt;P&gt;=Avg(Value_1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you want to use it in a new expression (Expression_2) within the same pivot table which contains&lt;/P&gt;&lt;P&gt;=Sum(Value_2 * Expression_1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then Expression_2 will take the result of Expression_1 rather than resolving the expression within Expression_2 to be a combination of the two expressions which would be like this&lt;/P&gt;&lt;P&gt;=Sum(Value_2 * Avg(Value_1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think that it must be the latter, as when I try and implement this method the expression just fails to resolve and returns Null over all rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So does anyone know how I could put Expression_1 into Expression_2 as the result of the expression rather than resolving Expression_1 within Expression_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this wasn't too confusing &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 02:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371307#M493679</guid>
      <dc:creator />
      <dc:date>2012-04-27T02:44:10Z</dc:date>
    </item>
    <item>
      <title>Get value from expression rather than expression itself</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371308#M493680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand what you're trying to do, perhaps if you would built an example it will help us help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Apr 2012 23:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371308#M493680</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2012-04-29T23:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get value from expression rather than expression itself</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371309#M493681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have attached my latest version of my test template. I tried something with the AGGR function to get the MULTIPLIER_2 value but somehow it did the calculation but only over 1 row for that ID instead of 3. This is also only ever going to work at ID level anyway, I need to be able to figure out how to do the calculation at row level with the MULTIPLIER_2 based on the ID so that I can use any dimension (eg. country) and still get the correct result for the sum of the calculated values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the idea is I have 2 dates selected and I want to get the SUM of:&lt;/P&gt;&lt;P&gt;VALUE (for Date To)&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; MULTIPLIER_1 (for Date To)&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; MULTIPLIER_2 (&lt;STRONG&gt;for Date From&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MULTIPLIER_2 is always the same for an ID in a particular date, no matter how many rows there are for that ID in that date. So I need to somehow retrieve one of those MULTIPLIER_2 values from Date From and insert it into the sum with the VALUE and MULTIPLIER_1 for Date To.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As stated earlier, in the real world application the MULTIPLIER_2 cannot be multiplied from outside of the SUM() that uses VALUE and MULTIPLIER_1, they must be used inside the same SUM().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 02:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371309#M493681</guid>
      <dc:creator />
      <dc:date>2012-04-30T02:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get value from expression rather than expression itself</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371310#M493682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I have figured out how to get it to work on ID level aggregation (by putting NODISTINCT in the AGGR() function). Still trying to figure out how to do this on a higher aggregation level.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 02:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-from-expression-rather-than-expression-itself/m-p/371310#M493682</guid>
      <dc:creator />
      <dc:date>2012-04-30T02:59:34Z</dc:date>
    </item>
  </channel>
</rss>

