Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to merge the days of the 53rd week of a year with the first week of next year in QlikView

Hi Guys,

I ran into a problem while using the Master Calendar and the problem is that I'm showing 53 weeks in a Line Chart for a year even if it has just one day which kinda gives an impression to the user that we have that much data in 7 days cos that's how long a week is supposed to be(Users really won't be thinking that Oh there's just one day in the Week 53).So what I am asked to do is to create a calendar for only 52 weeks and roll the remaining days into the first week of next year. So if we take current year i.e. 2018 into consideration, our 52nd week ends on 30th Dec which is a Sun and then we have 31st Dec(Mon) so what I would like is to create a script which rolls the the data associated with 31st Dec into Week 1 of 2019 and same should be true for 2019 Dec and 2020 Jan.

Below is the screenshot of the chart from my dashboard.So, how can I remove the 53 week number from the chart and merge it's data to the Week 1 of next year so that I am able to show 43 records for Week 1 instead of distributing it in Week 53 and Week 1.

FiscalYear.PNG

 

Any suggestion will be appreciated as I need to come up with a solution real quick.

Kind Regards,
Pranav

2 Replies
marcus_sommer

You need to adjust the weeknumber within your calendar-generation with something like:

...

if(week(DATE) = 53, 1, week(DATE)) as WEEK

...

whereby you might need to add some more conditions within a general rule because also the week 1 might have just 1 or 2 days within some years. Personally I wouldn't do this kind of adjustment because it will always create some amount of blurring and the users should be able to interpret the data without it. IMO it leads rather to more confusion than it helps in any way ...

- Marcus

pranaview
Creator III
Creator III
Author

Thanks for the quick reply and the tip Marcus. I will have to add some more conditions to this as you rightly mentioned to cover all the scenarios but I agree with you that this might create even more confusion for users which is why, I did not want to go ahead with this in the first place. Thanks again for the response.