Hi Everyone,
I have an problem in the calendar control. i need to show the weekyear start as week 1 default for every years.
But if check in Above pic if we select 2012 jan the 1st jan is falling in week 52 of the previous year.
Is there anyway to make the weekyearnum starts from 1st of jan for all years.
Can anyone help me to fix the issue.
sample script i tried,
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate AS OrderDate,
num(TempDate) AS NumDate,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
num(Month(TempDate)) As MonthNumber,
Day(TempDate) As Day,
YeartoDate(TempDate)*-1 as CurYTDFlag,
YeartoDate(TempDate,-1)*-1 as LastYTDFlag,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,
date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,
date(monthstart(TempDate), 'MM-YYYY') as MMYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay,
WeekYear(TempDate) as WeekYearNum
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
Thanks in advance,
Vikki