Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
aveeeeeee7en
Specialist III
Specialist III

Week Logic Requirement..............???

Dear All
I need to Categorize the Weeks for every month as Week1, Wee2,.........
 
If I use this:
'Week'&Ceil(Day(New_Date)/7) as  Weeks
than i am getting the Weeks as Week1, Week2,......
but the problem with this is it is calculating the Weeks as Week1 =  1-7, Week2 = 8-14..................
I don't want this.
I want to calculate Weeks as: Suppose take a example for January 2015 than:
Week1 = Thu, Fri, Sat, Sun (1,2,3,4)
Week1 = Mon, Tues, Wed, Thu, Fri, Sat, Sun (5,6,7,8,9,10,11)............................
Please find the enclosed Sample File for reference.
Regards
Av7eN
Labels (1)
2 Replies
aveeeeeee7en
Specialist III
Specialist III
Author

Any Suggestion??

anbu1984
Master III
Master III

Src:

LOAD Required???,

     WeekDay,

     SampleDate,

     WeekNumber,    

     Week(SampleDate) As WeekNo

FROM

[Sample File.xlsx]

(ooxml, embedded labels, table is Sheet1);

Join(Src)

Load WeekNo,'Week'&AutoNumber(RecNo(),Mth) As Weeks ;

Load WeekNo,Max(Month(SampleDate)) as Mth Resident Src Group by WeekNo Order by WeekNo asc;