Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
I need to analyze the model by year quarters and months.
Sales table between 2007 - 2010 and the budget table should be the same every year.
Can someone show me how to add it to the script?
You can create the Year field by : Year(DateField) AS Year
and Quarter by: Q & Ceil(Month(DateField)/3) AS Quarter
Or You can create the Master Calender Table and connected the Calender Table through your Date field.
CALENDAR:
LOAD DATEFIELD ,
Year(DATEFIELD) AS YEAR,
Month(DATEFIELD) AS MONTH
'Q' & Ceil(Month(DATEFIELD)/3) AS QUARTER,
Week(DATEFIELD) AS WEEK
;
LOAD DISTINCT DATEFIELD
Resident From SALES_TABLE;
You can any other calender fields to CALENDAR table if you need.