Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a calendar with the below fields. The data seems to be weekly based however user should be able to select date field and week/month field in the UI.
LOAD CalendarId,
WeekNumber,
MonthlyPeriod,
PeriodNo,
Quarter,
ref_WeekStrart,
ref_WeekEnd
FROM xyz
How can i create Date field & Week/Month fields from the above fields?
do you have some sample data of your source xyz?
So this is your calendar, you have one record per week, and you would like one record per date? I think this would expand your weeks out.
LOAD
CalendarId,
WeekNumber,
MonthlyPeriod,
PeriodNo,
Quarter,
ref_WeekStart+iterno()-1 as Date
FROM xyz
WHILE iterno() <= 7
;
I'm unclear what sort of data is in these fields, or what sort of data you want in your new Week/Month field (fields?), so I'll wait for more info on those.