Skip to main content
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor III
Partner - Contributor III

Fiscal week starting from Monday.

I am trying to start my week in fiscal calendar from Monday.It starts from Monday only for the current year but for the previous year it starts from Sunday.I want to start the week from Monday for all the years.

Below is the expression i've used:

Div(Date-YearStart(Date,0,4),7)+1 as Week,

Kindly help,



4 Replies

Why not set the first day of the week to Monday in the script where all the initial environment variables are set...

SET FirstWeekDay=7;

The default is 6 and equates to Sunday. 7 equates to Monday, etc...



Partner - Contributor III
Partner - Contributor III

Hii John,

Thanks for your rpl,but still am facing the same issue..


Former Employee
Former Employee

The following is in regard to fiscal year, but it may be of some help in getting you on the right track, it is a design blog post from Henric Cronstrom, hopefully it gets you a bit further on things.  There are a bunch of other posts out there as well, so I would be sure to search further if this one does not get you exactly what you need, as there may be another with the additional detail you need...


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

Thanks for that link Brett. I ended up playing with that far too long, but was able to create something close. It needs some finagling to get it to work YoY but I did get it to set the start week to 1 on April 1st. Getting it to not count week 1 UNTIL Monday in the first week of the year is the next challenge. Otherwise it works okay.

/* Set date range for calendar */

LET vDateMin = Num(MakeDate(2015,4,1));
LET vDateMax = Floor(MonthEnd(Today()));
LET vDateToday = Num(Today());

Date($(vDateMin) + RowNo() - 1) AS TempDate
AUTOGENERATE 1 WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);

/* HC's code, modified for vFW and fWeek below; */

Set vFM = 4 ; // First month of fiscal year
Set vFW = 14 ; /* Added to get the First week of fiscal year, as close to April 1st as possible */

Load TempDate as Date,   /* date to join to other data */
WeekDay,     /* To verify day of week when week starts */
Year + If(Month>=$(vFM), 1, 0) as fYear, // Numeric fiscal year
Mod(Month-$(vFM), 12)+1 as fMonth, // Numeric fiscal month
Mod(Week-$(vFW), 52)+1 as fWeek /* Added for the week. Not perfect but can be modified to get what you need */
Load TempDate,
Year(TempDate) as Year, // Your standard master calendar
Month(TempDate) as Month,
Week(TempDate) as Week,
WeekDay(TempDate) as WeekDay
RESIDENT TempCalendar

DROP TABLE TempCalendar;


Anyway, this should help Hamza...