<?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: SET Variable evaluates &amp;quot;$()&amp;quot; Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469846#M175478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vhuynh,&lt;/P&gt;&lt;P&gt;that is an excellent idea, because I have a excel configuration file already. And this way I will maintain my variables on a sheet of the configuration file and read them into the application looping over the lines of the variabletable. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2012 07:32:30 GMT</pubDate>
    <dc:creator>tobias_klett</dc:creator>
    <dc:date>2012-11-28T07:32:30Z</dc:date>
    <item>
      <title>SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469839#M175471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;my problem is that any Statement using "$(...)" is evaluated within a SET Variable line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For multiusage purposes I put a chart expression into a variable/constant. I do this already in the script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SET vTestVariable = sum( { &amp;lt; MONTHNUM = {"$(=max(MONTH))"} &amp;gt; } VALUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikView tries to evaluate the "$(=max(MONTH))" part even though it's a SET Statement. The evaluation failes and throws an internal error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice&lt;/P&gt;&lt;P&gt;Tobias &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 08:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469839#M175471</guid>
      <dc:creator>tobias_klett</dc:creator>
      <dc:date>2012-11-27T08:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469840#M175472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, that's a bit annoying..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can work around it like this but it's not very elegant:&lt;/P&gt;&lt;P&gt;SET vTestVariable = sum( { &amp;lt; MONTHNUM = {"@(=max(MONTH))"} &amp;gt; } VALUE);&lt;/P&gt;&lt;P&gt;LET vTestVariable = replace(vTestVariable, '@', '$');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 08:58:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469840#M175472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-27T08:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469841#M175473</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&gt;LET&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;vTestVariable&lt;/EM&gt;&lt;/STRONG&gt; = 'sum( { &amp;lt; MONTHNUM = {' &amp;amp; &lt;SPAN style="color: #0000ff;"&gt;chr&lt;/SPAN&gt;(36) &amp;amp; '(=max(MONTH))' &amp;amp; '} &amp;gt; } VALUE)'; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 09:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469841#M175473</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-11-27T09:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469842#M175474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi whiteline,&lt;/P&gt;&lt;P&gt;thanks for your suggestion. But it is not helpful for me since the original expression is very long and has many highcommas which would force me to make it very complicated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 09:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469842#M175474</guid>
      <dc:creator>tobias_klett</dc:creator>
      <dc:date>2012-11-27T09:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469843#M175475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case you could use Ctrl+H to replace $ with some other unique symbol as Johannes suggested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 16:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469843#M175475</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-11-27T16:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469844#M175476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can't use a subsitute character and replace it later, then another option is to put the expression in a csv file, and load the csv file, and set the variable in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have a csv file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;VariableName, VariableValue&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;vTestVariable, sum( { &amp;lt; MONTHNUM = {"$(=max(MONTH))"} &amp;gt; } VALUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then load the file into a table and set the variable in the script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;LET var = peek('VariableName', 0, 'VariableTable');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;LET $(var) = &lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;peek('&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;VariableValue&lt;/SPAN&gt;', 0, 'VariableTable');&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:31:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469844#M175476</guid>
      <dc:creator />
      <dc:date>2012-11-27T17:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469845#M175477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case isn't it easier to use inline load ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469845#M175477</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-11-27T19:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469846#M175478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vhuynh,&lt;/P&gt;&lt;P&gt;that is an excellent idea, because I have a excel configuration file already. And this way I will maintain my variables on a sheet of the configuration file and read them into the application looping over the lines of the variabletable. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 07:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469846#M175478</guid>
      <dc:creator>tobias_klett</dc:creator>
      <dc:date>2012-11-28T07:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: SET Variable evaluates "$()" Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469847#M175479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The $() syntax will evaluate in an inline table (actually, the dollar sign expansion will occur whenever it is found in the qvs script). Since $(=) has no meaning in a load script, $(=) will expand to an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 21:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Variable-evaluates-quot-quot-Statement/m-p/469847#M175479</guid>
      <dc:creator />
      <dc:date>2012-11-28T21:22:54Z</dc:date>
    </item>
  </channel>
</rss>

