<?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: Concatenating Year and Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753303#M268420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try adding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &amp;amp; &lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),'00') ) &lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS &lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year Month]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[num$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Week]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Month]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Day]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Good luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Oscar&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2014 23:14:58 GMT</pubDate>
    <dc:creator>oscar_ortiz</dc:creator>
    <dc:date>2014-12-01T23:14:58Z</dc:date>
    <item>
      <title>Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753302#M268419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I have the following calendar script:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #008f00;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;SUB&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;CalendarGen&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;vFieldName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;vTableName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;vPrefix&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;vGeneric&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;/*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; Calendar Generation Sub-routine&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; Parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; vFieldName - The field name of the date that a calendar should be based upon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; vTableName - The name of the table where the date field resides&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; vPrefix - The prefix of choice for date related field name generation, e.g. vPrefix = 'Sales' leads to field names of the format 'Sales MonthYear', 'Sales Year' etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; vGeneric - Optional parameter. 1 (default) = prepare for generation of a standalone calendar which is of benefit when analysing different aspects of time in one chart. 0 = Turn off generic calendar preparation.&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; v1.0, 16-Sep-2008, Author: Jonas Valleskog, QlikTech&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; v2.0, 17-Mar-2014, Author: Jonas Valleskog, ContextBI&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; Notes: Generic calendar generation script that enables scalable handling of creating and navigating multiple date fields&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; Implementation notes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; 1. Call the SUB procedure once per date field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; 2. Copy or re-create the calendar objects (time related list boxes) laid out in the front-end of this example QVW file &lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; Optimisation notes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; 1. To avoid potentially slow queries against large in-memory tables, contemplate storing out the date field to QVD first and use the QVD store as the input source to the MinMax: table creation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; 2. If gaps in calendars for missing dates are not an issue, consider replacing AUTOGENERATE() logic for generating the calendar table with a distinct list of each date seen in the source table instead. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; */&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;vGeneric&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vGeneric&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = 1;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;ENDIF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; MinMax:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;MaxDate&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;MinDate&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; [$(vTableName)];&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vMinDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('MinDate',0,'MinMax'));&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vMaxDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('MaxDate',-1,'MinMax'));&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vToday&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;());&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;// Quarter map generation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;SPAN style="color: #000000;"&gt;QuarterMap:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;MAPPING&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, Quarter&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, Q1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, Q1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, Q1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, Q2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, Q2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, Q2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7, Q3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8, Q3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9, Q3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10, Q4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11, Q4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12, Q4&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;// Calendar Generation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;vPrefix&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = 'Generic' &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vPrefix&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;=;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;ELSEIF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;vGeneric&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;BR /&gt; Calendars:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; '$(vPrefix)' &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;Calendar&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;vPrefix&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;vPrefix&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &amp;amp; ' ';&lt;BR /&gt; &lt;BR /&gt; [Generic Calendar]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMinDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;() - 1) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[Date]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMaxDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; - &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMinDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;+1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;ENDIF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;BR /&gt; [$(vPrefix)Calendar]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;autoNumber&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)MonthYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,'$(vPrefix)MonthYear') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)numMonthYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;autoNumber&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)QuarterYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,'$(vPrefix)QuarterYear') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)numQuarterYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;autoNumber&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)WeekYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,'$(vPrefix)WeekYear') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)numWeekYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AutoNumber&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Quarter]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, 'QuarterID') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[QuarterID]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[num$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Week]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Month]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Day]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)WeekDay]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;applyMap&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('QuarterMap', &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Quarter]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;monthStart&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;), 'MMM-YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)MonthYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;dual&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;applyMap&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('QuarterMap', &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;())&lt;BR /&gt; &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;QuarterStart&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)QuarterYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;dual&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;WeekStart&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)WeekYear]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year2Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, 0, 1, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vToday)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),1) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)YTD Flag]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year2Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, -1, 1, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vToday)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),1) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)PYTD Flag]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMinDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;() - 1) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMaxDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; - &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vMinDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;+1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; MinMax;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;END&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;SUB &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #008f00;"&gt;&lt;SPAN style="color: #0433ff; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #008f00;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;I want an expression to create the dimension key "Period" by concatenating the year and month into a single number within this calendar routine.&amp;nbsp; For example, October 2011 will be stored as 201110.&amp;nbsp; Can you assist &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #008f00;"&gt;&lt;SPAN style="font-size: 12pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #008f00;"&gt;&lt;SPAN style="color: #0433ff; font-size: 12pt;"&gt;&lt;SPAN style="color: #000000;"&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 23:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753302#M268419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-01T23:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753303#M268420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try adding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &amp;amp; &lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),'00') ) &lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS &lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year Month]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[num$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Week]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Year]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Month]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vFieldName)]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #941100;"&gt;[$(vPrefix)Day]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Good luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Oscar&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 23:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753303#M268420</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2014-12-01T23:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753304#M268421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;Date(monthStart([$(vFieldName)]), 'YYYYMM') AS[$(vPrefix)Period],&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 00:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753304#M268421</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-12-02T00:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753305#M268422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Marco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did that and i get the following error messages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-12-02 at 02.17.13.png" class="jive-image" src="/legacyfs/online/72497_Screen Shot 2014-12-02 at 02.17.13.png" style="width: 620px; height: 508px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-12-02 at 02.17.36.png" class="jive-image" src="/legacyfs/online/72498_Screen Shot 2014-12-02 at 02.17.36.png" style="width: 620px; height: 561px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-12-02 at 02.18.03.png" class="jive-image" src="/legacyfs/online/72499_Screen Shot 2014-12-02 at 02.18.03.png" /&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 00:22:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753305#M268422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T00:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753306#M268423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, i am trying it out and will let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 00:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753306#M268423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T00:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753307#M268424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is either a from clause missing in the line before LOAD Distinct or a ';' (preceding load)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 00:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753307#M268424</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-12-02T00:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753308#M268425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Marco, i will look into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 00:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753308#M268425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T00:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753309#M268426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script loads well.&amp;nbsp; I am getting the following display in the year list box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-12-02 at 03.50.17.png" class="jive-image" src="/legacyfs/online/72500_Screen Shot 2014-12-02 at 03.50.17.png" /&gt;&lt;/P&gt;&lt;P&gt;The date actually start from the number 13 to 2014.&amp;nbsp; What could be causing this?&amp;nbsp; How can i limit the years displayed to say the last 5 years?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 01:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753309#M268426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T01:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753310#M268427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The calendar is being built by the values stored in the table/field that you are passing to the function.&lt;/P&gt;&lt;P&gt;The function is going and getting the Min and Max values of the date field you are selecting.&lt;/P&gt;&lt;P&gt;You would want to limit the data being read initially into the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Oscar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 23:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753310#M268427</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2014-12-02T23:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753311#M268428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to limit the dates loaded to the last five years.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 23:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753311#M268428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T23:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Year and Month</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753312#M268429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generate Master Calendar in this case outside qlik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 23:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenating-Year-and-Month/m-p/753312#M268429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T23:48:27Z</dc:date>
    </item>
  </channel>
</rss>

