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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
apoorvasd
Creator II
Creator II

Week number issue when week start made to Sunday

Hello everyone,

I have tried changing week start to Sunday using this code: WeekStart(Datefield, 0, -1) as WeekStart and this works as expected. When I choose a particular week number, it displays dates starting from Sunday of that week until Saturday which is fine. But the problem is, when I choose the last week (say, week 53) in a particular year (say, 2015) I don't see all 7 dates, as few dates would belong to next year. I would like to include these dates also into previous week. How can this be achieved?

Attached in my example, When I choose, week 53 of 2015, would like to include 1st and 2nd Jan of 2016 too.

Thank you.

27 Replies
apoorvasd
Creator II
Creator II
Author

I have marked the correct answer. But I reloaded the app in my system today and it displays wrong dates again (1st and 2nd Jan of 2016 are not included as it was showing before). No idea what could be the issue.Weekyear.PNG

MK_QSL
MVP
MVP

I reloaded and it's working fine..

Enclose your new file.

apoorvasd
Creator II
Creator II
Author

PFA!

I tried your script to see if it works. But it still was the same. And only the app which you sent is working fine even if i reload! Strange

MK_QSL
MVP
MVP

I just reloaded your app and it's working fine.

MK_QSL
MVP
MVP

Capture.JPG

apoorvasd
Creator II
Creator II
Author

Strange! Is it something to do with my system date format or so?

MK_QSL
MVP
MVP

Not sure ! Sorry !

apoorvasd
Creator II
Creator II
Author

Okay no problem. Thank you.