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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

master Calender

Hi,

I Have 3 Date fields  Like CreatDate, DocDate, PstDate

All are representing the same month, date and year (Like 01/04/2014 to 30/04/2014but different value i want to create master calender

how can i

1 Solution

Accepted Solutions
amit_saini
Master III
Master III

Hi,

Call these fields by a single name for example here in this case i m considering name as Datefield.

You this scrip for master calender:

LET vMinDate = num(makedate(2005));

LET vMaxDate = num(today());

Datefield:

LOAD

    $(vMinDate) + IterNo() -1 as Datefield

AUTOGENERATE (1)

WHILE $(vMinDate) + IterNo() -1 <= $(vMaxDate);

Calendar:

LOAD

    Datefield as %Date,

    date(Datefield) as Date,

    year(Datefield) as Year,

    month(Datefield) as Month,

    day(Datefield) as Day,

    week(Datefield) as Week,

    weekday(Datefield) as Weekday

RESIDENT Datefield;

drop table Datefield;

Thanks,

AS

View solution in original post

4 Replies
amit_saini
Master III
Master III

Hi,

Call these fields by a single name for example here in this case i m considering name as Datefield.

You this scrip for master calender:

LET vMinDate = num(makedate(2005));

LET vMaxDate = num(today());

Datefield:

LOAD

    $(vMinDate) + IterNo() -1 as Datefield

AUTOGENERATE (1)

WHILE $(vMinDate) + IterNo() -1 <= $(vMaxDate);

Calendar:

LOAD

    Datefield as %Date,

    date(Datefield) as Date,

    year(Datefield) as Year,

    month(Datefield) as Month,

    day(Datefield) as Day,

    week(Datefield) as Week,

    weekday(Datefield) as Weekday

RESIDENT Datefield;

drop table Datefield;

Thanks,

AS

jagan
Partner - Champion III
Partner - Champion III

Hi,

For this scenario try Canonical Date from this thread

http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date

Regards,

Jagan.

Not applicable
Author

It is working

Thanks You For your Help.