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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Week number problem

Hi Please help me on this :

clock.JPG

I want to get the ff week number of the days just like he ff:

Week 1 ( aug 1-3 )

Week 2 ( aug 4-10 )

Week 3 ( aug 11-17 )

Week 4 ( aug 18-24 )

Week 5 ( aug 25-31 )

However, this script which i am using : Ceil(Day(CreatedDate)/7)

Returns :

     Week 1 ( aug 1-7)

     Week 2 ( aug 8-14)

     Week 3 ( aug 15-20)

     Week 4 ( aug 21-28)

     Week 5 ( aug 29-31)

I hope you can help me on this, thanks and more power!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Or,

directly try:

ceil((DateField-floor(weekend(monthstart(DateField))))/7)+1  as WeekOfMonth

View solution in original post

2 Replies
tresesco
MVP
MVP

Please refer this post

tresesco
MVP
MVP

Or,

directly try:

ceil((DateField-floor(weekend(monthstart(DateField))))/7)+1  as WeekOfMonth