<?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: help with variable in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473429#M176858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That doesnt work unfortunately, If i look at the variable in the variable overview window i see the following..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;sam_type={' 'ALLOCATION' '}, sam_fiscal_year = {' '$(=CurrentFiscalYear)' '} &amp;gt;} sam_volume),&amp;nbsp; ' '#,##0.00' ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: i have put spaces above so you can see they are 2 single quotes throught the expression. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2013 12:55:08 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2013-06-14T12:55:08Z</dc:date>
    <item>
      <title>help with variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473427#M176856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following variable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;sam_type={ALLOCATION}, sam_fiscal_year = {'$(=CurrentFiscalYear)'} &amp;gt;} sam_volume),&amp;nbsp; '#,##0.00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works if i create it in the Variable Overview, but if i try and create it in the script instaed i get an internal error when i look at it in the variable overview after a reload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vAllocation_FullYear = NUM(SUM({&amp;lt;sam_type={ALLOCATION}, sam_fiscal_year = {'$(=CurrentFiscalYear)'} &amp;gt;} sam_volume),&amp;nbsp; '#,##0.00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know what i am doing wrong please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 12:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473427#M176856</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2013-06-14T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: help with variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473428#M176857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that Qlikview will dollar-expand $(=CurrentFiscalYear) and try to evaluate it. That returns an error which then ends up in the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vAllocation_FullYear = NUM(SUM({&amp;lt;sam_type={'ALLOCATION'}, sam_fiscal_year = {'^(=CurrentFiscalYear)'} &amp;gt;} sam_volume),&amp;nbsp; '#,##0.00');&lt;/P&gt;&lt;P&gt;LET vAllocation_FullYear = replace('$(vAllocation_FullYear)','^','$');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: works for me. see attached qvw&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 12:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473428#M176857</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-06-14T12:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: help with variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473429#M176858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That doesnt work unfortunately, If i look at the variable in the variable overview window i see the following..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;sam_type={' 'ALLOCATION' '}, sam_fiscal_year = {' '$(=CurrentFiscalYear)' '} &amp;gt;} sam_volume),&amp;nbsp; ' '#,##0.00' ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: i have put spaces above so you can see they are 2 single quotes throught the expression. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 12:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-variable-in-script/m-p/473429#M176858</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2013-06-14T12:55:08Z</dc:date>
    </item>
  </channel>
</rss>

