Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Vinil
Contributor III
Contributor III

Weeks are not calculating properly

I have an issue in calculating the weeks in QlikView.I want to display all the week's data from week1,week2.....week53.

In a few years, we have 53 weeks and remaining to 52 weeks. So, my question is when I select the year 2015 in that my week 1 should display 01/01/2015 instead of that it displays the week1 2017 and the dates are related to 2015.

Please, help me out with this issue.

 

Thanks in Advance,

Vinil

 

vinil
4 Replies
suchit29
Partner - Contributor II
Partner - Contributor II

Use Weekstart() as Column1 and Weekend() Column2.

Concatenate both columns you will get the date range 

 Column1  &'-'& Column2

OR

You can use makeweekdate()

Makeweekdate(YEAR,Weekno) 

It will give you first day of the week.

 

Vinil
Contributor III
Contributor III
Author

I tried using that logic but not showing what I am expecting.

Please, go through the shared document it explains the issue and the logic I used for that to get the result.

 

 

vinil
suchit29
Partner - Contributor II
Partner - Contributor II

Use DATE column instead of Graph_week.

If it didn't work try using weekstart() and weekend() function

Brett_Bleess
Former Employee
Former Employee

Vinil, have a look at the following Design Blog post, might lend a bit more help as well on this use case:

https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130

The other post here is on master calendar, figured that might be helpful too, I will also provide the base Design Blog area URL too, that way you can search yourself, tons of how -to posts in this area that you will likely find very helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.