<?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 declaration on Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176341#M896741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Set vCurrentWeek1 = max([Calendar-Year])&lt;/SPAN&gt;&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;Set vCurrentWeek = Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Calendar-Year] = {"=$(vCurrentWeek1)"}&lt;/SPAN&gt;&amp;gt;}Sales)&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;Good Luck&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jul 2016 11:32:38 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2016-07-29T11:32:38Z</dc:date>
    <item>
      <title>Variable declaration on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176338#M896738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simple problem that i can't resolve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put in my script the declaration of a variable that includes another variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vCurrentWeek = "max({&amp;lt;[Calendar-Year]={&lt;STRONG&gt;$(v_MaxYear)&lt;/STRONG&gt;}&amp;gt;} [Calendar-Week])";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i want that when i recompile this script, in the variable declaration appear the &lt;STRONG style="font-size: 13.3333px;"&gt;$(v_MaxYear) &lt;/STRONG&gt;literally, not expanded with the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sin título.png" class="jive-image image-1" height="321" src="/legacyfs/online/132993_Sin título.png" style="height: 320.557px; width: 420px;" width="420" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sin título.png" class="jive-image image-2" height="327" src="/legacyfs/online/132994_Sin título.png" style="height: 326.913px; width: 430px;" width="430" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's posible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan.&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/Variable-declaration-on-Script/m-p/1176338#M896738</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176339#M896739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan, to avoid that you can replace the $ by another symbol, and load it using 'LET' and Replace(). Check this answer by Marcus Sommer: &lt;A href="https://community.qlik.com/message/358055"&gt;Re: Setting a variable in script...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as a bonus, from the same author: &lt;A href="https://community.qlik.com/docs/DOC-14559"&gt;Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case it can be:&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;Let vCurrentWeek = Replace('max({&amp;lt;[Calendar-Year]={#&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(v_MaxYear)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;}&amp;gt;} [Calendar-Week])', '#', '$');&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;The same can be used with simple quotes (if needed):&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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Let vCurrentWeek = Replace(Replace('max({&amp;lt;[Calendar-Year]={|#&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(v_MaxYear)|&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;}&amp;gt;} [Calendar-Week])', '#', '$'), '|', Chr(39));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176339#M896739</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-07-29T11:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176340#M896740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its called 'deferring the $ expansion'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176340#M896740</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-07-29T11:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176341#M896741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Set vCurrentWeek1 = max([Calendar-Year])&lt;/SPAN&gt;&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;Set vCurrentWeek = Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Calendar-Year] = {"=$(vCurrentWeek1)"}&lt;/SPAN&gt;&amp;gt;}Sales)&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;Good Luck&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176341#M896741</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-07-29T11:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176342#M896742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for the quick replies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfectly, thanks &lt;A href="https://community.qlik.com/qlik-users/21969"&gt;rubenmarin&lt;/A&gt;‌ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:08:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration-on-Script/m-p/1176342#M896742</guid>
      <dc:creator />
      <dc:date>2016-07-29T13:08:50Z</dc:date>
    </item>
  </channel>
</rss>

