Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a Master Calendar as below script; but I need to do the modification as I need Start of the week should be Thursday and end of the week should be Wednesday. but as per the script below it gives me Monday to Sunday week start and week end.
can we make change like this in Qlikvew ?
LET vDateMin = Num(MakeDate(1998,1,5));
LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12)));
LET vDateToday = Num(Today());
TempCalendar:
LOAD
$(vDateMin) + RowNo() - 1 AS DateNumber,
Date($(vDateMin) + RowNo() - 1) AS TempDate
AUTOGENERATE 1
WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);
MasterCalendar:
LOAD
TempDate AS Go_Live_Date__c,
Month(TempDate) AS CalendarMonth,
Year(TempDate) AS CalendarYear,
WeekStart(TempDate) AS WeekStart,
WeekEnd(TempDate) AS WeekEnd,
Week(TempDate) AS Week,
Month(TempDate) & '-' & Year(TempDate) AS CalendarMonthAndYear
RESIDENT TempCalendar ORDER BY TempDate ASC;
DROP TABLE TempCalendar;
Try
WeekStart(TempDate,0, 3) AS WeekStart,
WeekEnd(TempDate,0,3) AS WeekEnd,
Try this:
SET FirstWeekDay=3;
This would just fix the values for those two fields, wouldn't it be better to use the environmental variable to change the WeekStart day for the whole application?
If you are using QV 11.20 or earlier, have a look at
For Sense or QV12: