Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ankit777
Specialist
Specialist

Universal Calendar

How can I create a universal calendar for 100 years in Qlik view document?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Sorry, my mistake. Try the corrected (added num()) one below.

Let vStart=Num( MakeDate(Year(Today())-100, 1,1));

Let vEnd=Num( MakeDate(Year(Today()), 12,1));

Load Date, Month(Date) as Month, Year(Date) as Year;

Load Date($(vStart) + RecNo()) as Date autogenerate $(vEnd) - $(vStart) ;

View solution in original post

6 Replies
Siva_Sankar
Master II
Master II

here is the link for creating calendar

http://community.qlik.com/docs/DOC-1310

set yourself the start date and end date for 100 years in the variable, like below

LET Start = num(makedate(2000,1,1));

LET End = num(makedate(2100,12,1));

Regards.

Siva

tresesco
MVP
MVP

Something like:

Let vStart= MakeDate(Year(Today())-100, 1,1);

Let vEnd= MakeDate(Year(Today()), 12,1);

Load Date, Month(Date) as Month, Year(Date) as Year;

Load Date($(vStart) + RecNo()) as Date autogenerate $(vEnd) - $(vStart) ;

ankit777
Specialist
Specialist
Author

Hey Tresco,

The code that you have shared is not working properly for me. It just creates a calendar of 1905 from March to July.

ankit777
Specialist
Specialist
Author

Hi Siva,

The code that you have shared makes a calendar for the year 2005-2007 Sept, though I have made the end date as 01/12/2100.

tresesco
MVP
MVP

Sorry, my mistake. Try the corrected (added num()) one below.

Let vStart=Num( MakeDate(Year(Today())-100, 1,1));

Let vEnd=Num( MakeDate(Year(Today()), 12,1));

Load Date, Month(Date) as Month, Year(Date) as Year;

Load Date($(vStart) + RecNo()) as Date autogenerate $(vEnd) - $(vStart) ;

ankit777
Specialist
Specialist
Author

Fine. Thankyou.