Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date field in the format YYYY-MM.I have converted this date field to month and year.Only the months and the year which is there in the particular file loaded will be listed.I want all the months to be listed .I tried using the master calender script.But its not working.
Can Anyone give me the solution?
hi harshuharsh. this is very simple example that helps you to understand this issue (with only working days)
try this code:
let vStartDay = date('01/01/2010');
let vEndDate = date('31/12/2016');
for x = vStartDay to vEndDate
tempCalendar:
load $(x) as Date AutoGenerate(1);
next x
NoConcatenate
Working_Calendar:
Load Date, weekday(Date) as WeekDay, week(Date) as Week, Month(Date) as Month, Year(Date) as Year, floor(month(Date)/3)+1 as Qtr
resident tempCalendar
where WeekDay(Date) <> 'Sat' and WeekDay(Date) <> 'Sun';
drop table tempCalendar;
i think on the base of this exampe you will be able to solve your problem
beck
Hi, harshuharsh0811.
How is the connection between master calendar and the fact table?
Regards,
Jonas Melo.
Hi,
Its working fine now .Thanks