Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I get only one(1) line in the master calendar when I load from SQL
What can be wrong ? The Orders table ReklamationsTid contains several entries of each date.
kindly
Håkan
Please upload the script you are using to generate the master calendar to review it.
Also, in these cases it is good to use the debug and go step by step through the creation of the master calendar to make sure the variables are being assigned the correct values to run the autogenerate.
The script should be something like the following:
Min_Max_Dates:
LOAD %Date as Min_Max_DateKey
RESIDENT Transactions
Order by %Date;
LET vMinDate = num(peek('Min_Max_DateKey',0,'Min_Max_Dates'));
LET vMaxDate = num(peek('Min_Max_DateKey',-1,'Min_Max_Dates'));
Calendar:
load Date as %Date,
Date,
year(Date) as Year,
dual('Q' & ceil(month(Date)/3),ceil(month(Date)/3)) as Quarter,
month(Date) as Month,
monthname(Date) as [Month/Year],
week(Date) as Week,
day(Date) as Day,
weekstart(Date) as WeekStart;
LOAD
date($(vMinDate) + recno() - 1) as Date
AUTOGENERATE ($(vMaxDate) - $(vMinDate) + 1);
drop table Min_Max_Dates;
Regards.
Please post the statement from the master calendar
Please upload the script you are using to generate the master calendar to review it.
Also, in these cases it is good to use the debug and go step by step through the creation of the master calendar to make sure the variables are being assigned the correct values to run the autogenerate.
The script should be something like the following:
Min_Max_Dates:
LOAD %Date as Min_Max_DateKey
RESIDENT Transactions
Order by %Date;
LET vMinDate = num(peek('Min_Max_DateKey',0,'Min_Max_Dates'));
LET vMaxDate = num(peek('Min_Max_DateKey',-1,'Min_Max_Dates'));
Calendar:
load Date as %Date,
Date,
year(Date) as Year,
dual('Q' & ceil(month(Date)/3),ceil(month(Date)/3)) as Quarter,
month(Date) as Month,
monthname(Date) as [Month/Year],
week(Date) as Week,
day(Date) as Day,
weekstart(Date) as WeekStart;
LOAD
date($(vMinDate) + recno() - 1) as Date
AUTOGENERATE ($(vMaxDate) - $(vMinDate) + 1);
drop table Min_Max_Dates;
Regards.