Re: Master Calendar flag for QTD for all Years in the data
Hi, Been playing so try this Calendar: LOAD .... IF(CEIL(MONTH(TempDate)/3) = CEIL(MONTH(TODAY(1))/3) AND YEAR(TempDate) = YEAR(TODAY(1)) AND DATE(TempDate) <= TODAY(1),1) AS F_CAL_QTD, LEFT(DATE(TempDate),5) as TestJoin Resident TABLE;
LOAD TestJoin, 1 as C_QTDALL Resident Calendar WHERE F_CAL_QTD = 1;
Sorry not sure about leap years, but in theory should be ok.