Discussion board where members can get started with QlikView.
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?..
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.
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:
Let StartDate = num(date(YearStart(AddMonths(Today(),-48,0)),'YYYYMMDD'));
Let EndDate = num(date(YearEnd(AddMonths(Today(),0,0)),'YYYYMMDD'));
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)) ;
Date(datefield) as DateID;
I am attaching a QV document which demonstrates the use of master calendar.
Cheers - DV
I notice you did not do a YTD and MTD field. How would I go about doing that?