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
Anonymous
Not applicable

weekyear() doesn't seem to support a day offset, so I think you'll have to solve it the way Manish suggested.

apoorvasd
Creator II
Creator II
Author

If you don't mind, can you upload your qvw file where you have worked this out?

If I don't find the solution still, I will upload my sample. Just that it would take sometime for me to upload the file that's the reason.

Thank you.

apoorvasd
Creator II
Creator II
Author

Sure, thank you.

MK_QSL
MVP
MVP

FYI

apoorvasd
Creator II
Creator II
Author

Thank you. I will have a look into it.

Attached is my app.

MK_QSL
MVP
MVP

In your app also it's working..

apoorvasd
Creator II
Creator II
Author

Oh Yeah!! Did you make any change? (I don't see any though)

MK_QSL
MVP
MVP

Just reload the app.

apoorvasd
Creator II
Creator II
Author

Haha ...that's surprising! Even I had reloaded. Anyways it's working now.

Thank you very much!

MK_QSL
MVP
MVP

Please close the thread by selecting correct answer