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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating a calendar

Hi,

    Am using the below script to create a calendar starting from 01/01/2012.

    it works fine but it also gives future dates.

    I just want to display starting from 2012 to till date.

    what changes are to be made?

LOAD  date(makedate(year(today())-1)-1+RecNo(),'MM-DD-YYYY') as [Link Date]

AUTOGENERATE (makedate(year(today())+1) - makedate(year(today())-1));

thanks in advance

sujay

Labels (1)
1 Solution

Accepted Solutions
MEllinghausen
Creator III
Creator III

AUTOGENERATE(date((today())) -yearstart(YearStart(Today())-1))

Marcus

View solution in original post

6 Replies
Not applicable
Author

Hi,

Can you please attach your apllication.

Not applicable
Author

Hi nirmal

              i just want to create a calender from 01/01/2012 to till date.

this i am doing in the script of a qvd maker.

Later i am going to derive number of fields from [link date]

MEllinghausen
Creator III
Creator III

AUTOGENERATE(date((today())) -yearstart(YearStart(Today())-1))

Marcus

er_mohit
Master II
Master II

LET vDateMin = Num(MakeDate(2012,1,1));

LET vDateMax = Num(Today());

TempCalendar:

LOAD

$(vDateMin) + RowNo() - 1 AS DateNumber,

Date($(vDateMin) + RowNo() - 1) AS datefield

AUTOGENERATE 1

WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);

hope it helps

Not applicable
Author

Hi marcus

thanks for the reply.

everythings fine but its not giving 01/01/2012

i mean calender starts from 01/02/2012.

Jan 1st of 2012 is missing.

any suggestions?

sujay

Not applicable
Author

solved.