Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Why is the Master Calendar not working?
GetDateRange:
Load
Min(OrderDate) As MinDate,
Max(OrderDate) As Maxdate
Resident Facts;
Let vMinDate = Peek('MinDate', 0, 'GetDateRange');
Let vMaxDate = Peek('MaxDate', 0,'GetDateRange');
TempCalendar:
Load
date($(vMinDate) + RowNo()) As TempDate
AutoGenerate $(vMaxDate) - $(vMinDate) + 1;
MasterCalendar:
Load
TempDate As OrderDate,
Day(TempDate) As Day,
Year(TempDate) As Year,
Month(TempDate) As Month,
Week(TempDate) As Week,
'Q' & Ceil(Month(TempDate)/3) As Quarter,
Date(MonthStart(TempDate), 'MMM-YYYY') As MonthYear
Resident TempCalendar
Order By TempDate Asc;
Drop Table GetDateRange;
Drop Table TempCalendar;
Hi,
Max(OrderDate) As MaxDate
instead of
Max(OrderDate) As Maxdate
Regards,
Antonio
Thank you!