Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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?

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

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

tresB
Champion III
Champion III

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.

tresB
Champion III
Champion III

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.