Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?..
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
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;
(...)
Hi,
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?