Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

ankit777
Valued Contributor

Universal Calendar

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

1 Solution

Accepted Solutions
MVP
MVP

Re: Universal Calendar

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) ;

6 Replies
Siva_Sankar
Honored Contributor

Re: Universal Calendar

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

MVP
MVP

Re: Universal Calendar

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
Valued Contributor

Re: Universal Calendar

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
Valued Contributor

Re: Universal Calendar

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.

MVP
MVP

Re: Universal Calendar

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
Valued Contributor

Re: Universal Calendar

Fine. Thankyou.

Community Browser