Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

mnakayamaf
New Contributor II

Data for full calendar with weeks

Hi all

I need a QVD file or some attachment with data for a calendar with weeks.

I don't have a database SQL in my server, so, I need load a calendar with future datas that I can used like a filter with all days for next years.

somebody help-me?

1 Solution

Accepted Solutions
rahulpawarb
Valued Contributor III

Re: Data for full calendar with weeks

Hello Milton,

Please refer the sample application along with MasterCalendar.QVD file attached herewith. Let us know if you have any queries.

Regards!

Rahul

8 Replies

Re: Data for full calendar with weeks

Yes you can

Load * From Table; // This is your table

And calendar table seems this with dummy data

LOAD Date(MinDate+IterNo()-1) as Date 

While MinDate+IterNo()-1 <= MaxDate; 
LOAD MakeDate(1986) as MinDate, 
     MakeDate(2060) as MaxDate
AutoGenerate 1;

Then Simply Concatenate with Calendar date to your fact Table date. Then we have access the year from 1986 to 2060

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: Data for full calendar with weeks

Or this using Weeks and full calendar

Load DateField as DateField, Field1, Field2 from DataSource;

Concatenate

tabCalendar: 

LOAD *, 

     Day(Date) as Day, 

     WeekDay(Date) as WeekDay, 

     Week(Date) as Week, 

     WeekName(Date) as WeekName,

     Month(Date) as Month,

     MonthName(Date) as MonthName,

     Dual('Q'&Ceil(Month(Date)/3),Ceil(Month(Date)/3)) as Quarter,

     'Q'&Ceil(Month(Date)/3) & '-' & Year(Date) as QuarterYear,

     QuarterName(Date) as QuarterName, 

     Year(Date) as Year, 

     Day(Date) & '-' & Month(Date) as DayMonth,

     'Week'&Ceil(Day(Date)/7) as WeekNum,

     WeekYear(Date) as WeekYear;   

LOAD Date(MinDate+IterNo()-1) as DateField 

While MinDate+IterNo()-1 <= MaxDate; 

LOAD MakeDate(1986) as MinDate, 

     MakeDate(2060) as MaxDate

AutoGenerate 1;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vbarbera
New Contributor

Re: Data for full calendar with weeks

Hello Milton:

You can see this post. It is very similar to what you are looking for.

Calendario Maestro para obtener todos los días transcurridos

vbarbera
New Contributor

Re: Data for full calendar with weeks

If you want to use the code of Anil Babu Samineni, you have to make a small change. You have to change when you type "Date" with "DateField". It is an excellent solution.

rahulpawarb
Valued Contributor III

Re: Data for full calendar with weeks

Hello Milton,

Please refer the sample application along with MasterCalendar.QVD file attached herewith. Let us know if you have any queries.

Regards!

Rahul

mnakayamaf
New Contributor II

Re: Data for full calendar with weeks

thank you Saminemi!

But I'll use the MasterCalendar.QVD, but his answer will be very useful for other tasks!

mnakayamaf
New Contributor II

Re: Data for full calendar with weeks

Thank you, Pawar!

I'll use MasterCalendar.QVD for my application!

Regards,

Milton Nakayama

rahulpawarb
Valued Contributor III

Re: Data for full calendar with weeks

Cheers,

Rahul