<?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 Using a variable for calculation in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433680#M430921</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;can anyone show me how I can use variables which I defined in the script for calculation and creating a new attribut?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sales_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 &lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;=today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My new variable is target_date. This target_date can be flexible. It must not be the current date. It can be changed in the tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a new attribut called remaining_term which shows how many months are remained till reaching the end_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I edit the script&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Year(end_date)-year(&lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;))*12+month(end_date)-month(&lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;)) as remaining_term;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sales_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;Unfortunetely it is not working. I think it can't find the defined variable v_target_date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2017 10:39:54 GMT</pubDate>
    <dc:creator>thanhphongle</dc:creator>
    <dc:date>2017-09-18T10:39:54Z</dc:date>
    <item>
      <title>Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433680#M430921</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;can anyone show me how I can use variables which I defined in the script for calculation and creating a new attribut?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sales_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 &lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;=today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My new variable is target_date. This target_date can be flexible. It must not be the current date. It can be changed in the tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a new attribut called remaining_term which shows how many months are remained till reaching the end_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I edit the script&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Year(end_date)-year(&lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;))*12+month(end_date)-month(&lt;SPAN style="color: #ff0000;"&gt;v_target_date&lt;/SPAN&gt;)) as remaining_term;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sales_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;Unfortunetely it is not working. I think it can't find the defined variable v_target_date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 10:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433680#M430921</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-18T10:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433681#M430922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please wrap the variable into $(..),&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Year(end_date)-year($(&lt;SPAN style="color: #ff0000;"&gt;v_target_date)&lt;/SPAN&gt;))*12+month(end_date)-month($(&lt;SPAN style="color: #ff0000;"&gt;v_target_date)&lt;/SPAN&gt;)) as remaining_term;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 10:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433681#M430922</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-09-18T10:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433682#M430923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For QlikView you use the variable you need to place the variable name inside brackets preceded by a dollar sign:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Data:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Year(end_date)-year($(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;v_target_date)&lt;/SPAN&gt;))*12+month(end_date)-month($(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;v_target_date)&lt;/SPAN&gt;)) as remaining_term;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This is known as dollar sign expansion, sometimes shortened to DSE. Without DSE QlikView would be looking for a field called &lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;v_target_date&lt;/EM&gt; instead of the value of the variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Kind regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Andrew&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 10:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433682#M430923</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-09-18T10:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433683#M430924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But does QlikView consider that my variable v_target_date = today()&amp;nbsp; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 10:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433683#M430924</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-18T10:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433684#M430925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thahn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For using Variables in the script we need to mention the $(Variable_Name),So&lt;/P&gt;&lt;P&gt;Just Try This, It may Work For u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Data;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start_date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sales_import.xlsx&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(ooxml, embedded labels, table is main)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let v_target_date=today();&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;load *&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;((Year($(end_date))-year($(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v_target_date&lt;/SPAN&gt;)))*12+month($(&lt;SPAN style="font-size: 13.3333px;"&gt;end_date&lt;/SPAN&gt;))-month($(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v_target_date&lt;/SPAN&gt;))) as remaining_months&lt;/P&gt;&lt;P&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinayak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 11:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433684#M430925</guid>
      <dc:creator>vinayakg</dc:creator>
      <dc:date>2017-09-18T11:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433685#M430926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanh,&lt;/P&gt;&lt;P&gt;Test it to see. Make a textbox with the expression =&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #ff0000;"&gt;&lt;SPAN style="color: #000000;"&gt;v_target_dat&lt;SPAN style="color: #000000;"&gt;e&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-style: inherit; font-size: 13px; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-style: inherit; font-size: 13px; font-family: inherit; font-weight: inherit;"&gt;Kind regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-style: inherit; font-size: 13px; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-style: inherit; font-size: 13px; font-family: inherit; font-weight: inherit;"&gt;Andrew&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 11:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433685#M430926</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-09-18T11:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433686#M430927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 11:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433686#M430927</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-18T11:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433687#M430928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the upper example it somehow works. But if I try to use the attributes from my database with exactly the same expression it give it 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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Year(contract_end_date_cur)-year(19.09.2017))*12+month(contract_end_date_cur)-month(19.09.2017))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me out here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 10:39:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433687#M430928</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-19T10:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433688#M430929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think that you should not use the formatted entry for a date "19.09.2017" but please use a numeric expression instead:&lt;/P&gt;&lt;P&gt;-YEAR(DATE#(20170919, 'YYYYMMDD'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 11:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433688#M430929</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-09-19T11:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433689#M430930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually I defined a variable v_target_date=today()&lt;/P&gt;&lt;P&gt;QV automatically set it to the actual date when I load the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 11:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433689#M430930</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-19T11:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable for calculation in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433690#M430931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See here my current script&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; //((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;&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; bp_customer, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bp_contract_partner, &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; fi_rate_cur,&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_reg, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contract_end_date_cur&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;where fi_rate_cur&amp;gt;0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let v_target_date = today();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 11:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-for-calculation-in-the-script/m-p/1433690#M430931</guid>
      <dc:creator>thanhphongle</dc:creator>
      <dc:date>2017-09-19T11:59:24Z</dc:date>
    </item>
  </channel>
</rss>

