<?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: Wrong result from 'week' function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313073#M115563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi 52 is the last week of 2010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/1/2011 falls down in that week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to catch this week during load andchange with 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C u,&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2011 22:41:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-04T22:41:36Z</dc:date>
    <item>
      <title>Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313071#M115561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;BR /&gt;I'm using the 'week' function to retrive the week number of a date.&lt;BR /&gt;When the field's data is '01/01/2011' the result is '52'...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll appreciate if someone can reply me with the reson for this, and also the proposed solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;BR /&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:00:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313071#M115561</guid>
      <dc:creator>david_ze</dc:creator>
      <dc:date>2011-10-04T22:00:31Z</dc:date>
    </item>
    <item>
      <title>Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313072#M115562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Qlikview User IMHO the ISO definition for week numbering which is e.g. different from the one used in US I believe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week 1 is the week containig the first würdest oft the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. If you need different numbering, search the forum, I believe there are samples for Most Standard Systems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313072#M115562</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-10-04T22:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313073#M115563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi 52 is the last week of 2010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/1/2011 falls down in that week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to catch this week during load andchange with 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C u,&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313073#M115563</guid>
      <dc:creator />
      <dc:date>2011-10-04T22:41:36Z</dc:date>
    </item>
    <item>
      <title>Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313074#M115564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Damn Mobile..&lt;/P&gt;&lt;P&gt;I meant the week with the first thursday oft a year is week number&amp;nbsp; 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Stefan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313074#M115564</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-10-04T22:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313075#M115565</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;P&gt;swuehl wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Damn Mobile..&lt;/P&gt;&lt;P&gt;I meant the week with the first thursday oft a year is week number&amp;nbsp; 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Stefan &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;With this infomration , I think I was able to sort this problem which I faced myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I simply changed the script from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week(Date) as Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week(Date+2) as Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to work!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 08:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313075#M115565</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2012-03-30T08:53:17Z</dc:date>
    </item>
    <item>
      <title>Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313076#M115566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that this will work in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want to check out the compilation of different week numbering standards that John has posted some time ago:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/72204#72204"&gt;http://community.qlik.com/message/72204&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 10:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313076#M115566</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-03-30T10:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313077#M115567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;this will solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(subfield(LunarWeekName ('1/1/2011'),'/' ,2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check correct if you got ur answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 10:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313077#M115567</guid>
      <dc:creator />
      <dc:date>2012-03-30T10:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313078#M115568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Try this &lt;/P&gt;&lt;P&gt;IF ((DayNumberOfYear(date)) &amp;lt; 7 and week(date) &amp;gt; 2 , 1 ,&amp;nbsp; week(date#( date, 'DD/MM/YYYY'))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sivaraj S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 11:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313078#M115568</guid>
      <dc:creator>sivarajs</dc:creator>
      <dc:date>2012-03-30T11:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313079#M115569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same issue and did not like how it was displaying so I used this formula. Not the most elegant or exact, but I works for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(week(CalendarDate)&amp;gt;50 and month(CalendarDate)&amp;lt;10,1,week(CalendarDate)) as 'Calendar Week',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just had issues with the sorting, not so much with the 52.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 18:24:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313079#M115569</guid>
      <dc:creator />
      <dc:date>2012-03-30T18:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong result from 'week' function</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313080#M115570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Definitely not elegant but it does work to avoid jumps on bar chart from one year to another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 09:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-result-from-week-function/m-p/313080#M115570</guid>
      <dc:creator />
      <dc:date>2013-10-08T09:48:53Z</dc:date>
    </item>
  </channel>
</rss>

