<?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 on File Load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687685#M474284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vVariable1 = '=Only(Myfieldhere)'&lt;/P&gt;&lt;P&gt;The = results in a global variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vVariable2= 'Only(Myfieldhere)'&lt;/P&gt;&lt;P&gt;without the = does not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Nov 2014 15:35:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-21T15:35:56Z</dc:date>
    <item>
      <title>Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687678#M474277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know I've seen this addressed before but I can't find the discussion(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When loading variables from a file during script load, how do you keep embedded variables from being evaluated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example (off the top of my head, so maybe not a great example):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Variables.txt&amp;gt;&lt;/P&gt;&lt;P&gt;SET vEndDate = "=Max(Order_Date)";&lt;/P&gt;&lt;P&gt;SET vEndMonth = "=Month($(vEndDate))";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the variable file is read into the script during load, vEndMonth is doesn't give me 'Sep', for example, it just contains the literal string =Month($(vEndDate).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 19:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687678#M474277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T19:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687679#M474278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to write variable "statement" in single quote, instead of double:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SET vEndDate = 'Max(Order_Date)';&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 20:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687679#M474278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T20:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687680#M474279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, you've seen it before &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Here's a link to one such discussion with several different solutions: &lt;A _jive_internal="true" href="https://community.qlik.com/thread/133348"&gt;http://community.qlik.com/thread/133348&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 20:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687680#M474279</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2014-09-24T20:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687681#M474280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know, variables evaluation is a very complicated matter, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you can never be sure exactly the way they gonna behave, but first of all you have to understand the difference between the &lt;STRONG&gt;SET&lt;/STRONG&gt; and the &lt;STRONG&gt;LET &lt;/STRONG&gt;instruction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if you want a variable to evaluate to some value, i. e., using a formula, you'll have to use the LET instruction, &lt;STRONG&gt;not SET&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example it would be (with single quotation also corrected)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET vEndDate = '=Max(Order_Date)';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt; vEndMonth = '=Month($(vEndDate))';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I think it will evaluate to the formula =Month(=Max(Order_Date)) &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;whatever it's meaning is, but I'm not sure.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm afraid this is only the beginning of your challenge&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 14:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687681#M474280</guid>
      <dc:creator>bimartingo</dc:creator>
      <dc:date>2014-11-21T14:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687682#M474281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Someone at the Qlik conference here in Orlando said that if you are using $ expansion in the variable definition, you do not want to proceed the expression with a = sign since this causes the Ajax client to recalculate the expression on every click, leading to possible performance degradation. Has anyone else heard this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 14:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687682#M474281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-21T14:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687683#M474282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean an equals in the variable itself? If so then yes, the equals will cause it to be a global variable, calculated on each selection. Without the equals you can dollar expand and calculate specifically when you want to&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687683#M474282</guid>
      <dc:creator />
      <dc:date>2014-11-21T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687684#M474283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Joe. I'm not sure I follow - can you post an example both ways?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:30:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687684#M474283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-21T15:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687685#M474284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vVariable1 = '=Only(Myfieldhere)'&lt;/P&gt;&lt;P&gt;The = results in a global variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vVariable2= 'Only(Myfieldhere)'&lt;/P&gt;&lt;P&gt;without the = does not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687685#M474284</guid>
      <dc:creator />
      <dc:date>2014-11-21T15:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687686#M474285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent. What if the variable definition contains a dollar expansion reference to another variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687686#M474285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-21T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Evaluation on File Load</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687687#M474286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's fine you are able to do that yes, all the equals is doing in the variable is defining when it is evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example above if you create two text boxes to call each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Txtbx1:&lt;/P&gt;&lt;P&gt;=vVariable1&lt;/P&gt;&lt;P&gt;would return 'bob' for instance if that was the only selection from Myfieldhere&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Txtbx2:&lt;/P&gt;&lt;P&gt;=vVariable2&lt;/P&gt;&lt;P&gt;would return Only(Myfieldhere), as it hasn't been evaluated yet. You would need to do =$(vVariable2) to return 'bob'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that makes sense&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Evaluation-on-File-Load/m-p/687687#M474286</guid>
      <dc:creator />
      <dc:date>2014-11-21T15:51:11Z</dc:date>
    </item>
  </channel>
</rss>

