<?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: variable evaluation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843929#M1002928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here a very good explanations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3444"&gt;The Magic of Dollar Expansions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2015 07:54:59 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-06-08T07:54:59Z</dc:date>
    <item>
      <title>variable evaluation</title>
      <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843928#M1002927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between $(Max(Year) and $(=Max(Year)) ? I m really confused when to use which one ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 07:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843928#M1002927</guid>
      <dc:creator />
      <dc:date>2015-06-08T07:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: variable evaluation</title>
      <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843929#M1002928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here a very good explanations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3444"&gt;The Magic of Dollar Expansions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 07:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843929#M1002928</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-08T07:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: variable evaluation</title>
      <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843930#M1002930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi please read this post&amp;nbsp; by &lt;A href="https://community.qlik.com/people/hic"&gt;hic&lt;/A&gt;&lt;/P&gt;&lt;P&gt; &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables"&gt;https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 07:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843930#M1002930</guid>
      <dc:creator>qlikmsg4u</dc:creator>
      <dc:date>2015-06-08T07:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: variable evaluation</title>
      <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843931#M1002931</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 style="padding: 0 0 18px; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;EM&gt;$-sign expansion&lt;/EM&gt;&lt;/STRONG&gt; is a syntax form that allows a user to evaluate a variable, or an expression, and to replace the name or the expression with its result. The following is the list of some possible examples. While it’s not a complete list, it represents enough for the purpose of this analysis:&lt;/P&gt;&lt;H2 style="margin: 0 0 18px; font-size: 16px; font-family: Oxygen, Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: 300; color: #4e5c64;"&gt;$-sign expansions using a variable:&lt;/H2&gt;&lt;P style="padding: 0 0 18px; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;When $-sign expansion contains a variable, it will return the value of the variable at the time of the call. Changing the value of the variable can help make your application more flexible:&lt;/P&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // In this example, the value is passed to the Database as a hard-coded value:&lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let var1 = 1000;&lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT * FROM Sales Where SalesAmount &amp;gt;= $(var1);&amp;nbsp; &lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // In this example, the chart expression is calculated dynamically, based on the value of the variable&lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET var2 = ‘sum(Sales)’;&lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chart Expression:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(var2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/ADDRESS&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt; &lt;/ADDRESS&gt;&lt;H2 style="margin: 0 0 18px; font-size: 16px; font-family: Oxygen, Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: 300; color: #4e5c64;"&gt;$-sign expansions using formulas:&lt;/H2&gt;&lt;P style="padding: 0 0 18px; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;When $-sign expansion contains a formula, the formula will get evaluated at the time of the call:&lt;/P&gt;&lt;ADDRESS style="font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // In this example, the aggregation function is built based on the formula prior to being evaluated:&lt;/ADDRESS&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;sum(&lt;STRONG&gt;&lt;EM&gt;$(=’Expression’&amp;amp;vExprNumber)&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/ADDRESS&gt;&lt;P&gt;&lt;/P&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;// In this example, the formula is used as a part of a Set Analysis expression:&lt;/ADDRESS&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;sum( {&amp;lt;Date={“&amp;gt;=&lt;STRONG&gt;&lt;EM&gt;$(=Date(Today()-7))&lt;/EM&gt;&lt;/STRONG&gt;”}&amp;gt;} Sales)&lt;/ADDRESS&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 style="margin: 0 0 18px; font-size: 16px; font-family: Oxygen, Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: 300; color: #4e5c64;"&gt;$-sign expansion with parameters:&lt;/H2&gt;&lt;P style="padding: 0 0 18px; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;$-sign expansion can contain a formula with one or more parameters that are specified as $1, $2, $3:&lt;/P&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;// In this example, the formula can be modified dynamically based on the parameter:&lt;/ADDRESS&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;SET vExpr = ‘sum(Expression’ &amp;amp; $1 &amp;amp; ‘)’;&lt;/ADDRESS&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;Chart Expression: &lt;STRONG&gt;&lt;EM&gt;$(=$(vExpr (1))) &lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; – is equivalent to “sum(Expression1)”&lt;/ADDRESS&gt;&lt;ADDRESS style="padding: 0 0 0 30px; font-style: normal; color: #727a7e; font-family: 'Droid Sans', Arial, Geneva, Helvetica, sans-serif; font-size: 13px;"&gt;Chart Expression: &lt;STRONG&gt;&lt;EM&gt;$(=$(vExpr (2))) &lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; – is equivalent to “sum(Expression2)”&lt;/ADDRESS&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 08:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843931#M1002931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-08T08:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: variable evaluation</title>
      <link>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843932#M1002932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The dollar sign expansion allows to bring values into a context, for example when you to put the value of a variable into a context. In the example below the MyVariable value is expanded into the expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=Sum(MyField) + $(MyVariable) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this setup the dollar sign expansion is always evaluated and expanded first, before the expression is evaluated. If MyVariable has a value of 5, the actually evaluated expression looks like below. A value has been expanded into the expression, and the expression is then evaluated based on the expanded value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=Sum(MyField) + 5 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way you can use the dollar sign expansion to expand the result of an other expression. For example as in your exmaple whee you look for the max year. The equal sign inside the dollar expansion tells QlikView to evaluate the content of the dollar sign expansion as an expression. The result of the expression will then be expanded into the context where it is used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(=Max(Year))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;There must be a equal sign inside the dollar sign expansion if the content is expected to be evaluated. From that perspective your other example is an invalid statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(Max(Year) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 08:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-evaluation/m-p/843932#M1002932</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2015-06-08T08:30:34Z</dc:date>
    </item>
  </channel>
</rss>

