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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

auto generator for calender

Hi All,

I want to generate Date in Calender from the year 2007 to 2010.

really i dnt knw how to do it.

Please help me.

Thanks in advance

Regards,

Sri

2 Replies
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi, Please use the following script;

and refer the attached application.

for y=2007 to 2011
for m=1 to 12
XX:
load date(makedate($(y),$(m),recno()),'DD-MM-YYYY') as Date_1
autogenerate 31;
next
next

YY:
load month( Date_1) as mn,
year(Date_1) as yr,
day(Date_1) as dd
resident XX;
drop table XX;

Manesh

guytzumer
Partner - Contributor III
Partner - Contributor III

Hello Sri

you can create this script for Calander

Autogenerate 3600 - go way back, and then add a where close on Year as you wish for 2007 - 2010

😧

load

date(today()-rowno()) as Date

Autogenerate 3600;

Calendar:

load

Date,

month(Date) as Month,

'Q' & ceil(month(Date)/3) as Quarter,

week(Date) as Week,

weekday(Date) as Weekday,

year(Date) as Year,

if(DayNumberOfYear(Date)<DayNumberOfYear(today()),1,0) as YTD,

if(DayNumberOfYear(Date)<DayNumberOfYear(today())

and month(Date)=month(today()-1),1,0) as MTD,

year(Date)&num(month(Date),00) as YearMonth,

year(Date)&'-'& 'Q' &'-'& ceil(month(Date)/3)as YearQtr

resident D;//--- add Where ...

drop table D;

Hope it helps ..