<?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 variables in expression functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444253#M484503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;christine.hill schrieb:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales) is the variable&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;this will evaluate to a number, so whenever you are calling the variable, the result of the sum is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you trying to pass this value to another aggregation like sum() then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(even if you remove the equal sign from the variable definition, you would try to evaluate a sum() inside a sum(), which is not working without the use of advanced aggregation aggr() function)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 20:43:45 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-06-05T20:43:45Z</dc:date>
    <item>
      <title>Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444245#M484495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I have a variable vSales with a big nasty formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why doesn't this work?&amp;nbsp; It seems like it is just calcing the variable and returning a value without regard to the new expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(vSales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have something to do with where the = sign is placed in the expression and/or the variable formula?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444245#M484495</guid>
      <dc:creator />
      <dc:date>2013-06-05T19:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444246#M484496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prueba&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum($(vSales))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:05:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444246#M484496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-05T20:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444247#M484497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's probably due to the variable definition. Could you post the exact definition as shown in the variable overview?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444247#M484497</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-06-05T20:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444248#M484498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, I didn't type out the whole thing...&amp;nbsp; it should be =sum($(vSales)) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:06:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444248#M484498</guid>
      <dc:creator />
      <dc:date>2013-06-05T20:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444249#M484499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to simplify just to get the underlying reason for why this might happen, so let's just pretend it is something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found some things about how the variable behaves differently if the leading = sign is in the variable or not, and also something about putting an = sign next to the variable in the expression like this Sum($(=vSales)).&amp;nbsp; So I guess my question is are these things different?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales)&amp;nbsp;&amp;nbsp; vs&amp;nbsp;&amp;nbsp; =sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum($(=vSales))&amp;nbsp;&amp;nbsp; vs&amp;nbsp;&amp;nbsp; sum($(vSales))&amp;nbsp;&amp;nbsp;&amp;nbsp; vs&amp;nbsp;&amp;nbsp; =sum($(vSales))&amp;nbsp;&amp;nbsp; vs&amp;nbsp;&amp;nbsp; =sum($(=vSales))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:12:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444249#M484499</guid>
      <dc:creator />
      <dc:date>2013-06-05T20:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444250#M484500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, there are important differences, please see also &lt;/P&gt;&lt;P&gt;&lt;A class="loading active_link" href="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/" title="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/"&gt;http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't fully understood if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is your variable definition or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444250#M484500</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-06-05T20:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444251#M484501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales) is the variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444251#M484501</guid>
      <dc:creator />
      <dc:date>2013-06-05T20:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444252#M484502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vSales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sin utilizar el Sum(vSales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444252#M484502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-05T20:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in expression functions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444253#M484503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;christine.hill schrieb:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Year={$(=year(today()))}&amp;gt;}Sales) is the variable&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;this will evaluate to a number, so whenever you are calling the variable, the result of the sum is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you trying to pass this value to another aggregation like sum() then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(even if you remove the equal sign from the variable definition, you would try to evaluate a sum() inside a sum(), which is not working without the use of advanced aggregation aggr() function)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-expression-functions/m-p/444253#M484503</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-06-05T20:43:45Z</dc:date>
    </item>
  </channel>
</rss>

