<?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: Problem with using a variable in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393869#M423426</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"does the script continue, i.e. why is there a ";" at the end of the statement?"&lt;/P&gt;&lt;P&gt;No, the script just ends there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to rewrite the expression several times, but the brackets are fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Sep 2017 10:42:16 GMT</pubDate>
    <dc:creator>thanhphongle</dc:creator>
    <dc:date>2017-09-22T10:42:16Z</dc:date>
    <item>
      <title>Problem with using a variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393866#M423423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with using a variable in a script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt; ((Year(contract_end_date_cur)-year($(v_target_date)))*12+month(contract_end_date_cur)-month($(v_target_date))) as contract_term_remain;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD main_unique_id, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customer, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asset_model, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contract_start_date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contract_end_date_cur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;lease.one_import.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is main);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let v_target_date = today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV returns me this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error in expression:&lt;/P&gt;&lt;P&gt;')' expected&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((Year(contract_end_date_cur)-year(21.09.2017))*12+month(contract_end_date_cur)-month(21.09.2017)) as contract_term_remain;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked my expression. There's definetely not a ) missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope anyone can help me out here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 08:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393866#M423423</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-22T08:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with using a variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393867#M423424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks fine for me as well ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does the script continue, i.e. why is there a ";" at the end of the statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else would suggest to rewrite the expression (sometimes there might still be a bracket at the very right of the text),&lt;/P&gt;&lt;P&gt;or go through step-by-step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 09:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393867#M423424</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-09-22T09:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with using a variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393868#M423425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could imagine that the format of the variable is causing the error. Therefore either change the content of your variable to num(today()) or maybe floor(today()) or change the call of the variable to &lt;STRONG&gt;'&lt;/STRONG&gt;$(v_target_date)&lt;STRONG&gt;'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 10:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393868#M423425</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-09-22T10:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with using a variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393869#M423426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"does the script continue, i.e. why is there a ";" at the end of the statement?"&lt;/P&gt;&lt;P&gt;No, the script just ends there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to rewrite the expression several times, but the brackets are fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 10:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393869#M423426</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-22T10:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with using a variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393870#M423427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it finally works !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solutions&lt;/P&gt;&lt;P&gt;floor(today()) works,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;$(v_target_date)&lt;STRONG&gt;' works,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;num(today()) does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THX!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 10:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-a-variable-in-the-script/m-p/1393870#M423427</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-22T10:53:31Z</dc:date>
    </item>
  </channel>
</rss>

