<?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 interpreted in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520965#M194630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to prevent QV from evaluating the dollar sign expansion, either by doing something like&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET SetAnalysis = Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;= ' &amp;amp; '$' &amp;amp; '(=Min(CalendarDate))"} * {"&amp;lt;= ' &amp;amp; '$' &amp;amp; '(=Max(CalendarDate))"}&amp;gt;} DISTINCT ISSUE]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or substituiting the $ char with some other, e.g. @ and doing a replace on your variable in a second statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Oct 2013 10:50:06 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-10-07T10:50:06Z</dc:date>
    <item>
      <title>Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520963#M194628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following Set Analysis expression which I store in a variable in the script (it is not supposed to be modified so I do not want it defined only in Variable Overview):&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13811405342036891" jivemacro_uid="_13811405342036891" modifiedtitle="true"&gt;
&lt;P&gt;SET SetAnalysis = Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;= $(=Min(CalendarDate))"} * {"&amp;lt;= $(=Max(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;CalendarDate&lt;/SPAN&gt;))"}&amp;gt;} DISTINCT ISSUE]);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that when the script runs, it tries to interpret &lt;SPAN style="color: #000000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;$(=Min(CalendarDate)) &lt;/SPAN&gt;and &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;$(=Max(CalendarDate)) &lt;/SPAN&gt;despite the SET but Min() and Max() do not work in script so it fails (Graph expression only).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make sure script execution does not try to intepret &lt;SPAN style="color: #000000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;$(=Min(CalendarDate)) &lt;/SPAN&gt;and &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;$(=Max(CalendarDate)) &lt;/SPAN&gt;(and fail).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a few modifications without success to make it look like a string:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13811409651091282" jivemacro_uid="_13811409651091282" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;SET SetAnalysis = Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;= $(=Min(CalendarDate))"} * {"&amp;lt;= $(=Max(&lt;/SPAN&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;))"}&amp;gt;} DISTINCT ISSUE]);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SET SetAnalysis1 = 'Count({$&amp;lt;CODE = {"LAST"}, DATE = {"&amp;gt;= $(=Min(CalendarDate))"} * {"&amp;lt;= $(=Max(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;CalendarDate&lt;/SPAN&gt;))"}&amp;gt;} DISTINCT ISSUE])';&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;SET SetAnalysis2 = "Count({$&amp;lt;CODE = {'LAST'}, DATE = {'&amp;gt;= $(=Min(CalendarDate))'} * {'&amp;lt;= $(=Max(&lt;/SPAN&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;))'}&amp;gt;} DISTINCT ISSUE])";&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 10:43:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520963#M194628</guid>
      <dc:creator />
      <dc:date>2013-10-07T10:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520964#M194629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi cc cc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should place the code between ''.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 10:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520964#M194629</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2013-10-07T10:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520965#M194630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to prevent QV from evaluating the dollar sign expansion, either by doing something like&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET SetAnalysis = Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;= ' &amp;amp; '$' &amp;amp; '(=Min(CalendarDate))"} * {"&amp;lt;= ' &amp;amp; '$' &amp;amp; '(=Max(CalendarDate))"}&amp;gt;} DISTINCT ISSUE]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or substituiting the $ char with some other, e.g. @ and doing a replace on your variable in a second statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 10:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520965#M194630</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-07T10:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520966#M194631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;have you tried &lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;" " &lt;SPAN style="font-size: 12pt; color: #000000;"&gt; around your expression like below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;SET SetAnalysis = &lt;SPAN style="color: #ff0000; font-size: 19px;"&gt;"&lt;/SPAN&gt;Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;= $(=Min(CalendarDate))"} * {"&amp;lt;= $(=Max(CalendarDate))"}&amp;gt;} DISTINCT ISSUE]);&lt;SPAN style="color: #ff0000; font-size: 19px;"&gt;" &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; color: #000000;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;i think it will consider it a whole string and will not try to calculate expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;i did not tried but seems to work..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;Khan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 10:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520966#M194631</guid>
      <dc:creator>israrkhan</dc:creator>
      <dc:date>2013-10-07T10:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520967#M194632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Jeoren:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;SET SetAnalysis2 = &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;Count({$&amp;lt;CODE = {'LAST'}, DATE = {&lt;STRONG style=": ; color: #ff0000;"&gt;'&lt;/STRONG&gt;&amp;gt;= $(=Min(CalendarDate))&lt;STRONG style=": ; color: #ff0000;"&gt;'&lt;/STRONG&gt;} * {&lt;STRONG style=": ; color: #ff0000;"&gt;'&lt;/STRONG&gt;&amp;lt;= $(=Max(CalendarDate))&lt;STRONG style=": ; color: #ff0000;"&gt;'&lt;/STRONG&gt;}&amp;gt;} DISTINCT ISSUE])&lt;STRONG style="color: #ff0000;"&gt;"&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; font-family: arial, helvetica, sans-serif;"&gt;It fails:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Count({$&amp;lt;CODE = {'LAST'}, DATE = {'&amp;gt;= &lt;SPAN style="color: #ff0000;"&gt;(internal error)&lt;/SPAN&gt;'} * {'&amp;lt;= &lt;SPAN style="color: #ff0000;"&gt;(internal error)&lt;/SPAN&gt;'}&amp;gt;} DISTINCT ISSUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520967#M194632</guid>
      <dc:creator />
      <dc:date>2013-10-07T11:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520968#M194633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;I mean single quotes&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;SET SetAnalysis2 = &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Count({$&amp;lt;CODE = {'LAST'}, DATE = {&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;'&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&amp;gt;= $(=Min(CalendarDate))&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;'&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;} * {&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;'&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&amp;lt;= $(=Max(CalendarDate))&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;'&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;}&amp;gt;} DISTINCT ISSUE])&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520968#M194633</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2013-10-07T11:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520969#M194634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;LET SetAnalysis = &lt;STRONG style="color: #ff0000;"&gt;"&lt;/STRONG&gt;Count({$&amp;lt;CODE = {'LAST'}, DATE = {&lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;&amp;gt;= &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; &lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;$&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; &lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;(=Min(CalendarDate))&lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;} * {&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;= &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;$&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; &lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;(=Max(CalendarDate))&lt;STRONG style="color: #ff0000;"&gt;'&lt;/STRONG&gt;}&amp;gt;} DISTINCT ISSUE])&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&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;"&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;"&gt;Added double quotes around so it does not interpret Count() and replaced all others by single quotes b&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;ut when I check SetAnalysis after execution, it is empty so I guess something goes wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520969#M194634</guid>
      <dc:creator />
      <dc:date>2013-10-07T11:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520970#M194635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did not work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Variable Overview:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #000000;"&gt;'Count({$&amp;lt;CODE = {'LAST'}, DATE = {'&amp;gt;= (internal error)'} * {'&amp;lt;= (internal error)'}&amp;gt;} DISTINCT ISSUE)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not expect the parser to be able to handle opening/closing quotes but it looks like it can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know difference between ' and " (apart from syntax highlighting) and if it makes a real difference compared to PHP or other languages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520970#M194635</guid>
      <dc:creator />
      <dc:date>2013-10-07T11:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520971#M194636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one works for me ( you need to handle also the quoted LAST field modifer value):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET SetAnalysis = '=Count({$&amp;lt;CODE = {'&amp;amp;chr(39)&amp;amp;'LAST'&amp;amp;chr(39)&amp;amp;'}, DATE = {"&amp;gt;= ' &amp;amp; '$' &amp;amp; '(=Min(CalendarDate))&amp;lt;= ' &amp;amp; '$' &amp;amp; '(=Max(CalendarDate))"}&amp;gt;} DISTINCT ISSUE])';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Or use the replace method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET SetAnalysisTmp = Count({$&amp;lt;CODE = {'LAST'}, DATE = {"&amp;gt;=@(=Min(CalendarDate))&amp;lt;=@(=Max(CalendarDate))"}&amp;gt;} DISTINCT ISSUE]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET SetAnalysis2 = replace('$(SetAnalysisTmp)','@','$');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520971#M194636</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-07T11:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520972#M194637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use Replace() intelligently, I am just copying one section of discussion from &lt;A _jive_internal="true" href="https://community.qlik.com/message/7455#7455"&gt;here&lt;/A&gt; by @jacob drummond. I am sure this would help you.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;What you can do however is define the string you want in the script and use some other special character such as ~ to take the place of the $. Define a second variable which then references the first which replaces the ~ character with a $. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;set vTodayString = "~(Today());&lt;/P&gt;
&lt;P&gt;set vToday = "=replace([vTodayString],'~','$')";&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It's a hideous way of doing it, but it should work. I did this when using a variable to store an expression containing set analysis, which used dollar expansion within the definition for the set. Letting the script do the dollar expansion was generating an "internal error", hence this approach. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I can't see why you would want to do this for such a simple function, but it should help others out who may be doing something a little more complex.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Here is my set analysis expression for example:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Set analysis string using ~ in the place of $ to prevent expansion&lt;/P&gt;
&lt;P&gt;set DailyDemandString = "sum({~&amp;lt;TransType = {~(SALESTRANS)}, PERIOD_DATE = {'&amp;gt;=~(=Date('~(Today)' - [NumberOfDaysForDemand]))&amp;lt;=~(Today)'}&amp;gt;} MO_Quantity * -1) / [NumberOfDaysForDemand]";&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;set DailyDemand = "=replace([DailyDemandString],'~','$')";&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 12:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520972#M194637</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-07T12:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520973#M194638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;This is working I my script.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;SET SetAnalysis2 = &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;Count({$&amp;lt;CODE = {"LAST"}, DATE = {&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;&amp;gt;= $(=Min(CalendarDate))&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;} * {&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;&amp;lt;= $(=Max(CalendarDate))&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;}&amp;gt;} DISTINCT ISSUE])&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you send me a example zo I can look into it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 14:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520973#M194638</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2013-10-07T14:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520974#M194639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example. Data do not make much sense, it is just for test purpose. You basically are supposed to Sum COST for Products 3 to 8 (= 10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;swuehl proposal works fine. I initially switched some '/" to his solution because I did not expect &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;DATE = {&lt;SPAN style="color: #ff0000;"&gt;"&lt;/SPAN&gt;&amp;gt;= &lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt; to be properly parsed but in fact it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping for a lighter/cleaner version but I guess I do not have a choice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since those Set Analysis expressions are not supposed to be modified, I find it cleaner to declare them in the script instead of the Variable Overview where I would only store variables meant to be modified and retrieved from one session to another.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 18:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520974#M194639</guid>
      <dc:creator />
      <dc:date>2013-10-07T18:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520975#M194640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I haven't fully tested it, one solution which seems to work with your example is to replace the code you need to defer dollar expansion with a parameter holder and then submit the code at run time. Using your sample, here's how it works ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your target code is ...&lt;/P&gt;&lt;P&gt;Set SAflipside = Sum({$&amp;lt;CODE={"Y"}, PRODUCT =&lt;STRONG&gt; {"&amp;gt;= $(=Min(MIN))"} * {"&amp;lt;= $(=Max(MAX))"}&lt;/STRONG&gt;&amp;gt;} SOLD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... but you need to defer the Min and Max calculations. Replace ALL the PRODUCT code restriction with a holder ($1) so it becomes ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set SAflipside = Sum({$&amp;lt;CODE={"Y"}, PRODUCT = $1&amp;gt;} SOLD)&amp;nbsp; - it will show an error in the variable list (red underline), but it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... then in your front end object, resubmit it as this, the $1 holder is replaced by the submitted code in bold ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(SAflipside(&lt;STRONG&gt;{"&amp;gt;= $(=Min(MIN))"} * {"&amp;lt;= $(=Max(MAX))"}&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 10:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520975#M194640</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2013-10-08T10:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520976#M194641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks flipside but it is important to me to only have one variable call in the front end objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you need change a field name or adjust a formula, updating it everywhere is too painfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it looked like a good trick!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 16:20:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520976#M194641</guid>
      <dc:creator />
      <dc:date>2013-10-08T16:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520977#M194642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Technically it is still only one variable call and refining it the following way may be of more interest as you can control the parameters from within the script to make global changes easier.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 8pt; color: #808080;"&gt;&lt;STRONG style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;SET&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;SAflipside3 &lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= Sum({$&amp;lt;CODE={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Y"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, PRODUCT = {'&amp;gt;=$1'} * {'&amp;lt;=$2'}&amp;gt;} SOLD);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;SET &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;p1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= =Min(MIN);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;SET &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;p2=&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; =Max(MAX); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;then use the call as ...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;$(SAflipside3($(p1),$(p2))) &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;flipside&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 08:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520977#M194642</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2013-10-09T08:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Variable interpreted in script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520978#M194643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works perfectly flipside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;swuehl solution works fine too but I find the variable call more elegant from a code a point of view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot guys,&lt;/P&gt;&lt;P&gt;jc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 10:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-interpreted-in-script/m-p/520978#M194643</guid>
      <dc:creator />
      <dc:date>2013-10-16T10:16:41Z</dc:date>
    </item>
  </channel>
</rss>

