Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need Monthwise week seperation.
e.g
in Aug month as per calendar, it should display 6 weeks
as Week1, week2 and so on...
So how to do that ?
Something like below?
Let vMinDate = Num(YearStart(Today()));
Let vMaxDate = Num(YearEnd(Today()));
Date:
Load
Date,
WeekDay(Date) as Day,
If(Date = MonthStart(Date),1) as Week;
Load
Date($(vMinDate) + IterNo() - 1) as Date
AutoGenerate 1
While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);
Final:
Load
Date,
Month(Date) as Month,
Year(Date) as Year,
If(Week=1, Week,
If(Day = 'Mon', RangeSum(Peek('Week'),1),Peek('Week'))) as Week
Resident Date
Order By Date;
Drop Table Date;
sorry 6 weeks in Aug month???
Something like below?
Let vMinDate = Num(YearStart(Today()));
Let vMaxDate = Num(YearEnd(Today()));
Date:
Load
Date,
WeekDay(Date) as Day,
If(Date = MonthStart(Date),1) as Week;
Load
Date($(vMinDate) + IterNo() - 1) as Date
AutoGenerate 1
While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);
Final:
Load
Date,
Month(Date) as Month,
Year(Date) as Year,
If(Week=1, Week,
If(Day = 'Mon', RangeSum(Peek('Week'),1),Peek('Week'))) as Week
Resident Date
Order By Date;
Drop Table Date;
Hi,
Thanks for the help.
I have applied same logic in my application but I am getting multiple weeks instead of 6 weeks as per your script.
Please check the attached application as its not worked... please help @ manish !
Thanks in advance,
Mayuri.
You have to use WeekNum as your final Week Field... Not Week !
Hello,
I have also done using week, but still its giving multiple week.
Thanks ,
Mayuri
Upload the file after running the script. I am unable to see WeekNum
Thanks Manish... There was Date Problem