<?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: Error in Expression in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363762#M839052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pablo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can not use the Set Analisys expressions in script. You should use the create of the temp table with grouping COUNTRY and selections COUNTRY = SPAIN and YEAR_MONTH = YOURSEXPRESSION, and then transfer the received value to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 May 2017 08:03:56 GMT</pubDate>
    <dc:creator>ahaahaaha</dc:creator>
    <dc:date>2017-05-04T08:03:56Z</dc:date>
    <item>
      <title>Error in Expression in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363761#M839051</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 want to get the sells of spain for a month and i have done the following expression, however it is giving me error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let sell_spain=sum({$&amp;lt;YEAR_MONTH={$'&amp;amp;'(date)},Country={'SPAIN'}&amp;gt;}SELL);&lt;/P&gt;&lt;P&gt;let &lt;SPAN style="font-size: 13.3333px;"&gt;sell_spain&lt;/SPAN&gt;='=sum({$&amp;lt;YEAR_MONTH={$'&amp;amp;'(date)},Country={'SPAIN'}&amp;gt;}SELL)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i attached you the error that shows on the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;¿Can you help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&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/Error-in-Expression-in-Script/m-p/1363761#M839051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Expression in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363762#M839052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pablo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can not use the Set Analisys expressions in script. You should use the create of the temp table with grouping COUNTRY and selections COUNTRY = SPAIN and YEAR_MONTH = YOURSEXPRESSION, and then transfer the received value to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 08:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363762#M839052</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-05-04T08:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Expression in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363763#M839053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use the set analysis in the script convert it to if condition and then sum() should be used with the Group by clause &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 08:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363763#M839053</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-05-04T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Expression in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363764#M839054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have 2 things to solve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;the $ char, you can use a replace or chr(36)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let exp1 = replace('sum({^ &amp;lt;YEAR={^(=max(&lt;SPAN style="font-size: 13.3333px;"&gt;YEAR&lt;/SPAN&gt;))}&amp;gt;} SELL)', '^', '$');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let exp2 = 'sum({$ &amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;YEAR&lt;/SPAN&gt;={' &amp;amp; chr(36) &amp;amp; '(=max(&lt;SPAN style="font-size: 13.3333px;"&gt;YEAR&lt;/SPAN&gt;))}&amp;gt;} SELL)';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;the YEAR_MONTH,&lt;/P&gt;&lt;P&gt;you need something like&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;YEAR_MONTH={ $(=Date(max(date), 'YYYYMM')) }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Also replace the $ as suggested at 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest to read, thanks to &lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14559"&gt;Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;above all this section and define the variables outside Qlikview&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162145_1.jpg" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 08:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363764#M839054</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2017-05-04T08:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Expression in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363765#M839055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming that you want to create the expression in the load script to use in the front end. As people have already said, you cannot execute set analysis in the script, but you can create the expression. This is what I do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Set sell_spain = =Sum({$&amp;lt;YEAR_MONTH={#(date)}, Country={'SPAIN'}&amp;gt;} SELL);&lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Let sell_spain = Replace(sell_spain, '#', '$');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set statement does not need quotes, so you can drop the outside quotes. The double = sign means that the variable will be globally evaluated in the front end. Using replace does not cause the expression to evaluated now, and allows me to write the expression in a simpler form than with embedded string computation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your second let statement should work though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 08:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-Expression-in-Script/m-p/1363765#M839055</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-05-04T08:31:47Z</dc:date>
    </item>
  </channel>
</rss>

