Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Master calendar

hI,

I am having one date coloum.If i select startdate and enddate means, the data's should be display inbetween that startdate and and date...How to use master calendar for that?..

4 Replies
Not applicable
Author

Hi,

should it be automatically?

Otherwise you can select by holding STRG the start and enddate in your Mastercalender and so you have all the dates between.

Regards

vicky

salto
Specialist II
Specialist II

You need to make a relationship between your maste calendar table and your data table:

- A field in the maste calendar named, for example, DateID

- Another field in your data table named DatedID as well (both fields need to have the same name)

Qlikview will make a relation between both fields and the data will be automatically displayed.

Something like this:

//Calendar table

Let StartDate = num(date(YearStart(AddMonths(Today(),-48,0)),'YYYYMMDD'));

Let EndDate = num(date(YearEnd(AddMonths(Today(),0,0)),'YYYYMMDD'));

Calendar:

Load *,

Year(Date) AS [Year],

Month(Date) AS [Month];

Load Date($(StartDate)+(Iterno()-1),'YYYYMMDD') as Date,

Date($(StartDate)+(Iterno()-1),'YYYYMMDD') as DateID,

Autogenerate 1 While Date($(StartDate)+(Iterno()-1)) <=Date($(EndDate)) ;

/Data table

Data:

Load (...)

Date(datefield) as DateID;

(...)

IAMDV
Luminary Alumni
Luminary Alumni

Hi,

I am attaching a QV document which demonstrates the use of master calendar.

Cheers - DV

Not applicable
Author

I notice you did not do a YTD and MTD field. How would I go about doing that?