Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

Custom calendar

Hi Experts,

I have sales on daily basis for a complete year.

I Want to show the weekly sales. But User will define his own canlendar i.e., week start and weekend.

this calendar will not be constant that can change on monthly basis.

EX: user calendar

october:

week noweek startweek end
Week 11/10/20185/10/2018
Week 26/10/201812/10/2018

Week 3

13/10/201819/10/2018
Week 420/10/201826/10/2018
Week 527/10/201831/10/2018

november:

week noweek startweek end
Week 11/11/20182/11/2018
Week 23/11/20189/11/2018
Week 310/11/201816/11/2018
Week 417/11/201823/11/2018
Week 524/11/201830/11/2018
5 Replies
viveksingh
Creator III
Creator III
Author

stalwar1‌, gwassenaar‌ can you help me on this please..

jensmunnichs
Creator III
Creator III

Need some more information I think.

- Is the calendar actually user defined (as in, they input their own week start and week end values), or does it always follow the logic of your example here? (The logic I see is every week 1 starts on the first day of the month, every other week starts on saturday, and every last week of the month ends on the last day of the month, every other week ends on friday)

- If it is user defined, is the user allowed to reload?

- Does every month start back at week 1?

viveksingh
Creator III
Creator III
Author

‌yes, it is user defined one. In one month They take month start as 1st day of month. But there may be change like in another month, the week start will be 2nd date or any another of the month

yes, every month starts with week 1. But in a week there may be 1day or 5days or 7 Days...

one more point is, week numbers also may change. In this month we have 4 weeks. But in another month we may have 7 weeks.

user will define them in a excel, will be reloaded on monthly basis

jensmunnichs
Creator III
Creator III

Aha, in that case this might be a lot simpler than I initially thought. Have a look at the load prefix 'IntervalMatch':

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

So basically, you want to load in your data (Date, Sales, etc.) and the excel file with fields (week start, week end, week no). Then use IntervalMatch(Date) just like they did in the example on that page, and then, if done correctly, every record should have an extra field 'Week No' with Week 1, week 2, etc. which you can then use in your tables/charts.

Every time the excel sheet gets updated and the app is reloaded, the week no's will change accordingly.

Hope this helps

Anil_Babu_Samineni

What is the question? Am i missed anything above message?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful