<?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 assigning a numberic ID to YearWeek using AutoNumber() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911910#M652859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys that was really helpful. I made use of a resident table in order to sort the master calendar data before using the autonumber function!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 06:38:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-07T06:38:14Z</dc:date>
    <item>
      <title>Problem with assigning a numberic ID to YearWeek using AutoNumber()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911907#M652856</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 am trying to assign each of the YearWeek a new numeric ID using the Autonumber() function in the script, as shown below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1438769241768917 jive_text_macro" jivemacro_uid="_1438769241768917"&gt;
&lt;P&gt;[Master Calendar]:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; AutoNumber(YearWeek, 'YearWeekID') as [YearWeekID]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;LOAD Timekey as Date, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekMethode, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearWeek, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearMonth, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearQuarter, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quarter, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PeriodWeek, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FiscalWeek, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FiscalQuarter, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FiscalYear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I created a temporary table box with the YearWeekID and YearWeek field to test whether the script is working as &lt;SPAN style="font-size: 13.3333330154419px;"&gt;expect&lt;/SPAN&gt;. However to my surprise I got the following result: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95054_Capture.PNG" style="height: auto;" /&gt; &lt;IMG alt="Capture 2.PNG" class="jive-image image-2" src="/legacyfs/online/95055_Capture 2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't the calender be populated in ascending order in such a way that each new YearWeek will have a YearWeekID value that is the consecutive to its previous period? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appricated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 10:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911907#M652856</guid>
      <dc:creator />
      <dc:date>2015-08-05T10:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with assigning a numberic ID to YearWeek using AutoNumber()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911908#M652857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Shouldn't the calender be populated in ascending order in such a way that each new YearWeek will have a YearWeekID value that is the consecutive to its previous period?&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not unless your source data is sorted correctly already or you force that sorting in a resident load with an Order By clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 08:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911908#M652857</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-06T08:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with assigning a numberic ID to YearWeek using AutoNumber()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911909#M652858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Autonumber does not sort the data, it increments the autonumber when a new value is encountered in load order. Sorting the data before the autonumber will ensure that it is numbered in order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 08:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911909#M652858</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-06T08:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with assigning a numberic ID to YearWeek using AutoNumber()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911910#M652859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys that was really helpful. I made use of a resident table in order to sort the master calendar data before using the autonumber function!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 06:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-assigning-a-numberic-ID-to-YearWeek-using/m-p/911910#M652859</guid>
      <dc:creator />
      <dc:date>2015-08-07T06:38:14Z</dc:date>
    </item>
  </channel>
</rss>

