Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
hariprasad_koya
Contributor III
Contributor III

Scripting Current Year calendar(Year,Month,Quarter,MonthEndDate) from previous Year

Hi friends,

I have an excel data which listed upto 2019(four fields YearNo,quarterNo,MonthEndDate,MonthNo). Require Qlikview Script for deriving Current Year calendar (YearNo,quarterNo,MonthEndDate,MonthNo) from year 2019(Need to derive 2020 Calendar from 2019).

Can anyone help me out regarding this? It would be helpful if you can post the script.

Regards,

Hari

 

2 Replies
Brett_Bleess
Former Employee
Former Employee

This should put you on the right track with things I believe:

https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527

If you wish to search further in this area for other posts, there are over 700, use the following link:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

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.
Vegar
MVP
MVP

I'm not sure what you mean by "Script for deriving Current Year calendar ... from year 2019", but you don't need 2019 calendar to create 2020 calendar. 

As @Brett_Bleess  mention  you can look into articles on master calendar creation. The script sample below generates a calendar such as the one in your excel, but it is extended with current year (2020) calendar as well.

MonthCalendar:
LOAD
	Year(MonthEndDate) as YearNo,
	ceil(month(MonthEndDate)/3) as quarterNo,
	MonthEndDate,
	Month(MonthEndDate) as MonthNo;
LOAD 
	DayName(monthend(makedate(2012,1),IterNo()-1)) as MonthEndDate
AutoGenerate 1
While 
	monthend(makedate(2012,1),IterNo()-1) < YearStart(today(),1);