Getting full fiscal quarters via their start date:
Start:
LOAD Distinct
Date(Floor(FYStartDate),'YYYY-MM-DD') AS FYStartDate
;
SQL
Select Distinct
Min(FYStartDate) AS FYStartDate
From REF.Calendar
Where Year(FullDate) = Year(DATEADD(mm,-12,GETDATE()))
AND FYQuarter = '1'
;
LET vStartDate = peek('FYStartDate');
Drop Table Start;
No comments:
Post a Comment