//--- Assign the start and end dates to variables LET vMinDate = Peek('MinDate', 0, 'Temp_Calendar_Range'); LET vMaxDate = Peek('MaxDate', 0, 'Temp_Calendar_Range'); DROP TABLE Temp_Calendar_Range; // Cleanup
[Master Calendar]: LOAD DISTINCT Year(Temp_Date) * 100 + Month(Temp_Date) as [Period], Year(Temp_Date) as [Year], Month(Temp_Date) as [Month], Date(Temp_Date, 'YYYY-MM') as [Year - Month], 'Q' & Ceil(Month(Temp_Date) / 3) as [Quarter] ; LOAD DISTINCT MonthStart($(vMinDate) + IterNo() - 1) as Temp_Date AUTOGENERATE (1) WHILE $(vMinDate) + IterNo() - 1 <= $(vMaxDate); //--- Remove the temporary variables LET vMinDate = Null();