Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Week number counting start on monday

Hi Please help me with the ff:

I want to break down the week of month into week 1 - 5

So far i i am successful with it but i have a new specs which should be :

Now Week 1 of august should also have July 29, 30 31 simply because the calendar above shows that it hit the date which starts on Monday..

Please help me on this again guys,

Thanks!

4 Replies
tresesco
MVP
MVP

Have a look here

Not applicable
Author

Hi Tresesco,

Thanks for the input..

this one is good, however i need to tweak the code a little bit on WeekNumber field because instead of week 31, i shoud have week1 of august.

date.JPG

Currently i have this one

ceil(

      (

      CreatedDate-floor(weekend(monthstart(CreatedDate)))

      )/7

      )+1

tresesco
MVP
MVP

Hi Jayson,

In such situation, i guess you have to redefine our month as well. Otherwise, which dates would be there in the 5th week of July? Have you thought of it? If yes, please share a sample data with two months data and expected output.

Not applicable
Author

Thanks bro,

yes i was actually looking at that but i was hoping i could use a much easier approach if any

on week 5 of July 2013,, it should also have the Aug 1 & 2,,because it falls on Thursday and Friday

So the week 5 of July should now be ranging from July 29 - Aug 2..

Redefining of months is what i am trying to do right now, just still not getting it on my head