<?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 Problem with a variable: Script Line Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-a-variable-Script-Line-Error/m-p/1343769#M617387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to achieve a Variable which is giving me the calendarweek +1 week, e.g. this week is 201725 so I want to have an output of 201726,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my first idea was to make it with an if-statement:&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 style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vL.ActualCalenderWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()),4) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Weekname&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()),2); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&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;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vL.NextCalenderWeek2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1,2)=52 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1),2)=53,(left(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4)+1)&amp;amp;'01',&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did NOT work. I am getting a Script Line Error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error:&lt;/P&gt;&lt;P&gt;LET vL.NextCalenderWeek2= (if(right(201725+1,2)=52 or right(201725+1),2)=53,(left(201725,4)+1)&amp;amp;'01',201725+1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My second idea is working:&lt;/P&gt;&lt;P&gt;&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;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vL.NextCalendarWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2),52,53),(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4)+1)&amp;amp;'01',&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT I really would like to know, where my mistake is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 12:48:24 GMT</pubDate>
    <dc:creator>chriys1337</dc:creator>
    <dc:date>2017-06-22T12:48:24Z</dc:date>
    <item>
      <title>Problem with a variable: Script Line Error</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-variable-Script-Line-Error/m-p/1343769#M617387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to achieve a Variable which is giving me the calendarweek +1 week, e.g. this week is 201725 so I want to have an output of 201726,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my first idea was to make it with an if-statement:&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 style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vL.ActualCalenderWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()),4) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Weekname&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()),2); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&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;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vL.NextCalenderWeek2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1,2)=52 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1),2)=53,(left(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4)+1)&amp;amp;'01',&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did NOT work. I am getting a Script Line Error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error:&lt;/P&gt;&lt;P&gt;LET vL.NextCalenderWeek2= (if(right(201725+1,2)=52 or right(201725+1),2)=53,(left(201725,4)+1)&amp;amp;'01',201725+1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My second idea is working:&lt;/P&gt;&lt;P&gt;&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;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vL.NextCalendarWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2),52,53),(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4)+1)&amp;amp;'01',&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vL.ActualCalendarWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT I really would like to know, where my mistake is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 12:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-variable-Script-Line-Error/m-p/1343769#M617387</guid>
      <dc:creator>chriys1337</dc:creator>
      <dc:date>2017-06-22T12:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a variable: Script Line Error</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-variable-Script-Line-Error/m-p/1343770#M617388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this is an alternatively:&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 style="color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vL.ActualCalenderWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;Year&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) * 100 + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()); &lt;/SPAN&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 style="color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vL.&lt;SPAN style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;NextCalenderWeek2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;Year&lt;SPAN style="font-size: 8pt;"&gt;(weekstart(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())-1) * 100 + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(weekstart(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())-1);&lt;/SPAN&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>Thu, 22 Jun 2017 12:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-variable-Script-Line-Error/m-p/1343770#M617388</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-06-22T12:57:19Z</dc:date>
    </item>
  </channel>
</rss>

