Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field name "Date' in my source data. I want to create a master calendar (data island) by using this field.
Can anyone give me the load script for this requirement please. Attached sample data.
Hi,
Try this script
Data:
LOAD DISTINCT
Date(Floor(Date)) AS Date
FROM
[Date.xlsx]
(ooxml, embedded labels, table is Sheet1);
CalendarMaster:
LOAD
Date(Date) AS Date,
Year(Date) AS Year,
'Q' & Ceil(Month(Date) / 3) AS Quarter,
Month(Date) As Month,
Day(Date) As Day,
Week(Date) As Week;
Load Date(MinDate + IterNo() -1 ) AS Date While (MinDate + IterNo() - 1) <= Num(MaxDate);
Load
Min(Date) AS MinDate,
Max(Date) AS MaxDate
RESIDENT Data;
Regards,
Jagan.
Hi,
Try this script
Data:
LOAD DISTINCT
Date(Floor(Date)) AS Date
FROM
[Date.xlsx]
(ooxml, embedded labels, table is Sheet1);
CalendarMaster:
LOAD
Date(Date) AS Date,
Year(Date) AS Year,
'Q' & Ceil(Month(Date) / 3) AS Quarter,
Month(Date) As Month,
Day(Date) As Day,
Week(Date) As Week;
Load Date(MinDate + IterNo() -1 ) AS Date While (MinDate + IterNo() - 1) <= Num(MaxDate);
Load
Min(Date) AS MinDate,
Max(Date) AS MaxDate
RESIDENT Data;
Regards,
Jagan.
Hi Jagan,
Thanks for the solution and it's working as expected.