<?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: Fiscal Master Calendar Script Error ')' Expected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039935#M642240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron Payne,&lt;/P&gt;&lt;P&gt;Upload the &lt;SPAN style="font-size: 13.3333px;"&gt;QVW &lt;/SPAN&gt;exemple.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jan 2016 17:32:27 GMT</pubDate>
    <dc:creator>israelcsouza</dc:creator>
    <dc:date>2016-01-20T17:32:27Z</dc:date>
    <item>
      <title>Fiscal Master Calendar Script Error ')' Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039934#M642239</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'm attempting to write a fiscal calendar and need a flag for previous and current year and month, but got stuck. I'm getting errors as commented in the below script. Does anybody have any suggestions or syntax changes to make this logic work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;tempFisc2:&amp;nbsp;&amp;nbsp; //one row table to feed variable values&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FiscalYear,&lt;/P&gt;&lt;P&gt;FiscalQuarter,&lt;/P&gt;&lt;P&gt;FiscalMonth&lt;/P&gt;&lt;P&gt;Resident tempFiscCal&lt;/P&gt;&lt;P&gt;Where CalendarDate = Date(Now())&amp;nbsp;&amp;nbsp;&amp;nbsp; //Today's Date &amp;gt;&amp;gt;&amp;gt; should it be Date(Today())?&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET v_RP_CFyr = peek('FiscalYear', 0, 'tempFisc2');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //should have a value of '2016', 1st (only) row of above&lt;/P&gt;&lt;P&gt;LET v_RP_CFQ = peek('FiscalQuarter', 0, 'tempFisc2');&lt;/P&gt;&lt;P&gt;LET v_RP_CFMo = peek('FiscalMonth', 0, 'tempFisc2');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;FiscCal:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;FiscalMonth &amp;amp; '-' &amp;amp; FiscalYear as FiscalMonthYear,&lt;/P&gt;&lt;P&gt;if($(v_RP_CFyr) = FiscalYear, 1,0) as cFYr_Flag,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //says ')' expected&lt;/P&gt;&lt;P&gt;if(peek('FiscalYear', 0, 'tempFisc2') = FiscalYear, 1, 0) as cFYr_Flag2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //tried this, returns 0 only&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(v_RP_CFyr = FiscalYear, 1,0) as cFYr_Flag3,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //field not found (due to resident load)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Resident tempFiscCal;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table tempFiscCal, tempFisc2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 17:07:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039934#M642239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-20T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Master Calendar Script Error ')' Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039935#M642240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron Payne,&lt;/P&gt;&lt;P&gt;Upload the &lt;SPAN style="font-size: 13.3333px;"&gt;QVW &lt;/SPAN&gt;exemple.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 17:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039935#M642240</guid>
      <dc:creator>israelcsouza</dc:creator>
      <dc:date>2016-01-20T17:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Master Calendar Script Error ')' Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039936#M642241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is how you used the variables - if a variable contained a numeric value you could access them with $(var) and if they contained a string you need single-quotes around the variable like: '$(var)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you find many useful links to fiscal calendar and flagging from periods and some more topics: &lt;A href="https://community.qlik.com/docs/DOC-8843"&gt;How to use - Master-Calendar and Date-Values&lt;/A&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>Wed, 20 Jan 2016 19:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039936#M642241</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-01-20T19:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Master Calendar Script Error ')' Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039937#M642242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Marc. This was a good suggestion. I have forced my variable to num and changed WHERE... date(now()) to date(today()). I'm uploading the same qvw to show you how it works using the variables before the final load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 19:50:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fiscal-Master-Calendar-Script-Error-Expected/m-p/1039937#M642242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-20T19:50:16Z</dc:date>
    </item>
  </channel>
</rss>

