Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

Calendar setting

Hi, would it be possible to create a calendar that is not related to the table being loaded?
I wanna know how to write in the script.

And also I wanna know how can I determine the default period for calendars?
I want to set the calendar period as 3 months.

2 Replies
Mark_Little
Luminary
Luminary

Hi, 

You need a date range to make your calendar off, but you can do that within script.

One a i made early

//Peek out the values in to variables for later use
let vStart = NUM(YearStart(AddYears(TODAY(),-5)))-1;
let vEnd = NUM(AddYears(YearEnd(TODAY()),2));
let vRange = $(vEnd) - $(vStart);

//Generate a table with a row per date between the range above
TempCalendar:
Load
$(vStart)+recno() as TempDate
autogenerate $(vRange);

 

Just set the start and end to be the three month period you want. Then create a calendar as normal.

louise119
Creator III
Creator III
Author

Thank you so much!
Is it possible to show the default display as 3 months?