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: 
rathnam_qv
Creator
Creator

calendar


Hi all,

i have one calendar for year 2010 to 2013(till nov)

but i want to create it for Jan 2010 to Dec 2013.

i am using these variables 

LET vDateMin = Num(MakeDate(2010,1,1));
LET vDateMax = ;

In my second i want to store DEC 2013 values..

how to do that

NOTE**** i don't want to Hardcode it

can any one help me......

Thanks in advance!!!!!

Smiley

Labels (1)
2 Replies
Not applicable

Try Below

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

LET vDateMax = Num(AddYears($(vDateMin),4)-1);

Best Regards,

Amey

mdmukramali
Specialist III
Specialist III

Dear,

Use:

LET vDateMax = Floor(YearEnd(Today())); 

calender script:

///////////////////////////////////////////////////////////////////

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

LET vDateMax = Floor(YearEnd(Today())); 

LET vDateToday = Num(Today()); 

TempCalendar: 

LOAD

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

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

AUTOGENERATE 1 

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

Calendar: 

LOAD

Date(TempDate) AS Date,

Month(TempDate) AS Month, 

'Q' & Ceil(Month(TempDate)/3) AS Quarter, 

Year(TempDate) AS Year

RESIDENT TempCalendar ORDER BY TempDate ASC; 

DROP TABLE TempCalendar; 


Thanks,

Mukram.