Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
My business is very cyclical within each month. I would like to monitor performance based on the day of the week. I was able to extract the day of the week using the weekday function. My next step is to append/prepend a figure 1,2,3,4,5 to represent the weekday of the month. First Monday = Monday1, Second Monday = Monday2, etc.
Any idea as how to accomplish this?
Thanks,
TJ
Maybe like
LOAD *,
WeekDayName & Autonumber(Week(Date), MonthName(Date) ) as NewField;
LOAD
... // your calendar code including the WeekDayName and Date field
May be like this:
LOAD Date,
WeekDay(Date) as WeekDay,
WeekDay(Date) & AutoNumber(RowNo(), WeekDay(Date)&Month(Date)) as WeekDayNum
Resident ....;
Another option not depending on the order of the dates in the input table would be
LOAD WeekDay(Date) & (Div(Day(Date),7)+1) as Test,
*;
LOAD Date(MakeDate(2016)+recno()-1) as Date
AutoGenerate 366;