<?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 LET Variable in Script with Set Expression - which does not compute in Frontend in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221619#M390546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have built a Variable with LET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vL.CF&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= 'sum({&amp;lt;Index_YearWeek={' &amp;amp; '$' &amp;amp; '(=max(Index_YearWeek))}&amp;gt;}Index_CF_Med)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the front end (in a textbox) it comes out like the string aboth (without ' and &amp;amp;), so I put a $-sign around my Variable name $(vL.CF) and it computes the correct number. My question is now, what I have to do, that =vL.CF gives me the number already?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I thought LET computes the value already, but in this case not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2017 15:54:42 GMT</pubDate>
    <dc:creator>chriys1337</dc:creator>
    <dc:date>2017-02-06T15:54:42Z</dc:date>
    <item>
      <title>LET Variable in Script with Set Expression - which does not compute in Frontend</title>
      <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221619#M390546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have built a Variable with LET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vL.CF&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= 'sum({&amp;lt;Index_YearWeek={' &amp;amp; '$' &amp;amp; '(=max(Index_YearWeek))}&amp;gt;}Index_CF_Med)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the front end (in a textbox) it comes out like the string aboth (without ' and &amp;amp;), so I put a $-sign around my Variable name $(vL.CF) and it computes the correct number. My question is now, what I have to do, that =vL.CF gives me the number already?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I thought LET computes the value already, but in this case not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2017 15:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221619#M390546</guid>
      <dc:creator>chriys1337</dc:creator>
      <dc:date>2017-02-06T15:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: LET Variable in Script with Set Expression - which does not compute in Frontend</title>
      <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221620#M390547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you check if adding = sign helps?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vL.CF = '&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;sum({&amp;lt;Index_YearWeek={' &amp;amp; '$' &amp;amp; '(=max(Index_YearWeek))}&amp;gt;}Index_CF_Med)';&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2017 16:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221620#M390547</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-06T16:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: LET Variable in Script with Set Expression - which does not compute in Frontend</title>
      <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221621#M390548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LET will evaluate your expression and assign the result to the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your expression is not returning an aggregate (i.e. evaluating the sum() function), but a concatenated string literal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, you can't evaluate your aggregation in the script (no set analysis in script) and you can only use aggregation functions in a table LOAD (again, you can of course create a literal that contains the aggregation function as text, like you did).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clarified the use of LET here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer if you need to add the equal sign or not, is another topic, and it will be dependent on the context you want to finally use your variable in.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2017 16:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221621#M390548</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-06T16:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: LET Variable in Script with Set Expression - which does not compute in Frontend</title>
      <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221622#M390549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So there is no way to compute the result in the script, as you say?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your effort!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 08:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221622#M390549</guid>
      <dc:creator>chriys1337</dc:creator>
      <dc:date>2017-02-07T08:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: LET Variable in Script with Set Expression - which does not compute in Frontend</title>
      <link>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221623#M390550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not using set analysis and not considering user selections (which will influence 'max week').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are fine with static aggregates, that doesn't recompute when the user makes selections, you can precalculate them in the script (using table loads, group by clause and aggregation functions).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 08:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LET-Variable-in-Script-with-Set-Expression-which-does-not/m-p/1221623#M390550</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-07T08:42:47Z</dc:date>
    </item>
  </channel>
</rss>

