<?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: Week Start - Sunday instead of Monday in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496827#M690107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the last thing I need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Pay Period&amp;nbsp; - which will include all the weeks in current year pay period (CYPP)&lt;/P&gt;&lt;P&gt;LastYearPayPeriod - last's year corresponding pay period (LYPP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a chart that is for Period X (Current Period) and includes Week 1,2,3, &amp;amp; 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we are in Week 1 of the Current Period, then it will only show this week's revenue and weeks 2,3,4 will be blank until that week occurs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Nov 2013 19:35:54 GMT</pubDate>
    <dc:creator>jenmclean</dc:creator>
    <dc:date>2013-11-20T19:35:54Z</dc:date>
    <item>
      <title>Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496806#M690086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the attached script from Henric Cronström that accomplishes what I need to do so that I calculate weeks to match pay periods but am having an issue where it is generating a week 0 which should be Week 52 and it shows the first three days of that week as 0 and the remaining 4 as week 1. (see screen shot).&lt;A href="https://community.qlik.com/qlik-users/4003"&gt;Henric Cronström&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I correct this? I am attaching my modified file as well.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Weeks.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/48718_Weeks.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:07:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496806#M690086</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T17:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496807#M690087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jennie,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;See if this attached QVW works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did was simple put a conditional in your load that checks for 0 in US_WeekNumber and replaces with 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Div&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FirstDayOfWeek1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,7)+1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;US_WeekNumber &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;if(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Div&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FirstDayOfWeek1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,7)+1 &amp;gt; 0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Div&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FirstDayOfWeek1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,7)+1, 1) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;US_WeekNumber &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are probably better ways to handle this, but I think this does the trick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496807#M690087</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-07T17:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496808#M690088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do this, then I get two Week 1's in 2012, it needs to be rolling from my start date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496808#M690088</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T17:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496809#M690089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(Div(Date-FirstDayOfWeek1,7)+1 = 0, 52, Div(Date-FirstDayOfWeek1,7)+1) as US_WeekNumber&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496809#M690089</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-07T17:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496810#M690090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then I get the following results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Weeks2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/48719_Weeks2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496810#M690090</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T17:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496811#M690091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Week 1 of the year 2012 needs to begin on 1/8/2012; Week 52 should start on 1/1/12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am so close! Just need to get this to work and I am off and running in my document re-design.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 18:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496811#M690091</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T18:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496812#M690092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I'm getting closer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the attached. I've re-written the code to use a loop by year. The starting date is specified before the loop and the loop goes through three three iterations for each year and builds 52 weeks each. In this situation - 2014 drops off as a year - since we're basically including the first week of each year as the last week of the prior year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 18:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496812#M690092</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-07T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496813#M690093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Date&amp;lt;6-weekday(yearstart(Date))+yearstart(Date),53,ceil(DayNumberOfYear(Date-6+weekday(yearstart(Date)))/7)) as US_Week,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496813#M690093</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-07T19:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496814#M690094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be clear. Are you actually looking for this?&amp;nbsp; "Week 1 of the year 2012 needs to begin on 1/8/2012; &lt;STRONG&gt;Week 52 should start on 1/1/12&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the case - then you'll be looking at looking at week 52 of 2013 starting on 12/30/2012 and week 1 of 2013 starting on 1/6/2013. Does that sound right or are you looking for weeks 1-52 to be sequential?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496814#M690094</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-07T20:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496815#M690095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the example showing non-sequential week numbers, Week 52 of 2012 begins 1/1/2012- Week 1 of 2012 begins 1/8/2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were some other issues I believe with the script which was causing you to start on Sundays, but your first week of each year was eight days so all subsequent weeks began on Mondays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should now show a rolling 52 week year beginning on 1/9/2011 with 7 day weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496815#M690095</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-07T20:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496816#M690096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Week 52 of 2013 starting on 12/30/2012 and week 1 of 2013 starting on 1/6/2013.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I need to report on Pay Dates (2 weeks) and Pay Periods (13 Pay Periods Per Year) and not Calendar weeks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Week starts on Sunday and ends on Saturday as they run a 6 day work week. This is a service based company.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496816#M690096</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T20:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496817#M690097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok - the QVW I posted at 3:23 is set up the way you describe. Please take a look and tell me what you think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:40:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496817#M690097</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-07T20:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496818#M690098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Testing it out...will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496818#M690098</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-07T20:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496819#M690099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example in the blog post assumes broken weeks over New Year, which is not what you want...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code will generate numbers where Jan 4th always belongs to week one, Sunday is the first day of the week, and there are no partial weeks. I am sure that there are other ways to do it, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Div(Date - SundayWeekYearStart, 7) +1 as SundayWeekNumber&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(WeekStart(Date,0,-1) &amp;lt; MakeDate(Year(Date)-1,12,29), WeekStart(YearStart(Date,-1)+3,0,-1),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(WeekStart(Date,0,-1) &amp;gt;= MakeDate(Year(Date),12,29), WeekStart(YearStart(Date,+1)+3,0,-1),&lt;/P&gt;&lt;P&gt;&amp;nbsp; WeekStart(YearStart(Date)+3,0,-1) &lt;/P&gt;&lt;P&gt;&amp;nbsp; )) as SundayWeekYearStart&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;Load Date ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496819#M690099</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-11-08T10:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496820#M690100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting back to this calendar issue, I think I have the basic calendar down and now I need to generate additional calendar flags. I am attaching my latest version of this which includes comment code from the old caledar that I am trying to redevelop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also need to report by Pay Period which I have as a commented line as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This calendar programming is not my forte! Any and all help is much appreciated. I work on this project on Wednesday and Thursdays and would love to have this done this week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 18:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496820#M690100</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-13T18:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496821#M690101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I posted a new file if you have a chance to look it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 19:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496821#M690101</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-13T19:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496822#M690102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - I've got it an will post an update later this evening. It's definitely getting weird!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the model of having week 52 offset and technically the first week of the year, I have the pay periods set up to show weeks 52, 1, 2 and 3 as PP1. The other flags will take a bit of work,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 20:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496822#M690102</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-13T20:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496823#M690103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 20:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496823#M690103</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-13T20:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496824#M690104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; J&lt;SPAN style="mso-fareast-font-family: 'Times New Roman';"&gt;ennie,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: auto; margin-bottom: auto;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;While working on the calendar with the flags it occurred to me that what you're really trying to build here is a 4-4-5 calendar where each quarter is comprised of two four week months and a five week month.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: auto; margin-bottom: auto;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Using that here are the requirements as I understand them:&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Create a calendar using Sunday as the week start.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Week 52 is the first week of the fiscal year, followed by week1, 2, 3 …&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Begin calendar from specified date as week 1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;52 weeks per year&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;26 pay period per year&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;13 weeks per quarter (4-4-5)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Flags built to compare equivalent “Fiscal” periods, not calendar periods.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; margin-bottom: auto; font-family: arial,helvetica,sans-serif; margin-top: auto; mso-fareast-font-family: 'Times New Roman';"&gt;Since you chose not to the use built in routines to determine your CM, CMTD, CQTD, and CYTD type flags, I’m assuming it’s because you need to compare to the prior year’s fiscal period defined by your 52 week year (364 days). In this scenario all the 4-4-5, 4-5-4, 5-4-4 calendar implementations I’ve seen tend to fall short as they don’t really give you the ability to compare non-standard date ranges with prior periods that are also non-standard.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; margin-bottom: auto; font-family: arial,helvetica,sans-serif; margin-top: auto; mso-fareast-font-family: 'Times New Roman';"&gt;Let’s say you wanted to compare current YTD with prior YTD. Given this 4-4-5 calendar,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;“Fiscal” 2013 begins 12/30/2012&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;“Fiscal” 2012 begins 1/1/2012&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P style="margin-top: auto; margin-bottom: auto;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Using a TD of 11/14/2013 for the current year, we are 320 days into the year. The same TD period of 320 days into 2012 translates to 11/15/2012. 2012 was a leap year and begins on January 1&lt;SUP&gt;st&lt;/SUP&gt;. &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;In order to create the date flags for compare fluctuating date ranges in this fashion I found myself using quite a bit of conditional logic to evaluate when the flags should be set. I’m not sure if there is a more elegant way to build flags for this specific purpose,&lt;BR /&gt;but if there are, I have yet to run across them.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: auto; margin-bottom: auto;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;I’ve included all the flags from your comments using the idea of this 4-4-5 fiscal calendar. Please take a look at the Calendar Validation sheet in the attached application to verify if these are the flags you are looking for.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: auto; margin-bottom: auto;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I have a question for you as well. &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The typical 4-4-5 calendar’s I’ve seen are actually based on&amp;nbsp; custom accounting &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;periods to handle the loss of the day(s) in certain years to prevent the calendar &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;for continuously losing ground as time goes on. In your scenario how is your &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;customer planning on reclaiming the lost days?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 04:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496824#M690104</guid>
      <dc:creator>mbm</dc:creator>
      <dc:date>2013-11-15T04:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Week Start - Sunday instead of Monday</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496825#M690105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This calendar is working correctly for my application but i need a few additional items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Along with Period reporting, I need to compare current week period to the same week period from last year. The previous code had mappings for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Period&lt;/P&gt;&lt;P&gt;Current Period Week&lt;/P&gt;&lt;P&gt;Last Year Pay Period (this is the one I really need)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I have the Gross Revenue from the current week and then I need to show Gross Revenue from the same week from the Previous Year and then I calculate goals and averages (15%).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you so much for your help, I am so close now I can taste it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching my file so that you can see how I am applying it if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 17:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Start-Sunday-instead-of-Monday/m-p/496825#M690105</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2013-11-20T17:46:11Z</dc:date>
    </item>
  </channel>
</rss>

