Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
How to generate the weekend(Saturday), year of first weekend(Saturday) in QlikView script Master Calendar.
Thanks,
Lawrance A
Check here: Change accordingly. Like below:
= Date(YearStart(Today()) + 6)
Hi all,
Could someone help to create the all weekend(saturday) and year of first weekend(Saturday).
Let me know if you need more details.
Thanks,
Lawrance A
Hi
Not sure if you are looking for following
LET Start = floor(YearStart(Date#('01/01/2017', 'MM/DD/YYYY')));
LET End = floor(YearEnd(Date#('01/01/2017', 'MM/DD/YYYY')));
LET NumOfDays = End - Start + 1;
Date_src:
LOAD
$(Start) + Rowno() - 1 as DateID
AUTOGENERATE $(NumOfDays);
[MasterCalendar]:
LOAD
DateID, // just in case
date(DateID) as CalDate, // it will be in format defined in your SET DateFormat=, or in your system format
day(DateID) as CalDay,
week(DateID) as CalWeek,
month(DateID) as CalMonth, // simple month name; it is dual - numeric and text
dual(month(DateID) & '-' & year(DateID),
year(DateID) & num(month(DateID), '00')) as CalMonthYear, // Month-Year format, dual
year(DateID) as CalYear,
WeekDay(DateID) as CalWeekday,
WeekEnd(DateID, 0, 5) as CalWeekEnd,
'Q' & ceil(month(DateID)/3) as CalQuarter, // in format Q1, Q2, Q3, Q4
// dual('Q' & ceil(month(DateID)/3) & '-' & year(DateID)) as MonthQuarter,
year(DateID) & ceil(month(DateID)/3) as CalYearQtr // Qn-Year, dual
// and whatever else you may want here...
RESIDENT Date_src;
Drop Table Date_src;
You can tweak it as per your need.
Also, if you have found solution to this and other threads of your then please close them.
BR,
Vijay
Hi Vijay,
Thanks for your response.
I expecting the year of first weekend.
For Example,
Year: 2017
First Month: January
First Weekend(Saturday): 01/07/2017(MM/DD/YYYY)
Expected Output: 01/07/2017
Thanks,
Lawrance A
Check here: Change accordingly. Like below:
= Date(YearStart(Today()) + 6)