Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Specialist III
Specialist III

Hello Milton,

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

Regards!

Rahul

View solution in original post

8 Replies
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

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;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vbarbera
Contributor
Contributor

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
Contributor
Contributor

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
Specialist III
Specialist III

Hello Milton,

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

Regards!

Rahul

Anonymous
Not applicable
Author

thank you Saminemi!

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

Anonymous
Not applicable
Author

Thank you, Pawar!

I'll use MasterCalendar.QVD for my application!

Regards,

Milton Nakayama

rahulpawarb
Specialist III
Specialist III

Cheers,

Rahul