Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
online I found that I can write the field "WeekYear" like this in the Master Calendar:
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear
This calculates weeks from Mondays to Mondays, and as a result in some years, I get 53 weeks (for example, week 53 has both December and January in it).
I want to fix that in a way that if for example December 31 is Wednesday in Week 53, the rest of the days
(which are January of next year) until next Monday as the script calculate, won't be taken into account.
In short, what I want to do is :
So, week 1 should be 1-4 /Jan
week 2 should be 5-11/Jan
week 3 should be 12-18/Jan
week 4 should be 19-25/Jan
week 5 should be 26-31/Jan
and week 1 for Feb should be only 1/Feb
week 2 should be 2-8/Feb
etc, so there isn't any intersection of the weeks, leading to wrong averages in my case and misleading interpretations.
What should i do?
I don't know if Qlik is able to do the week division that you want in an expression.
If not possible, You can do a process to obtain your expected calendar (for each day of the month obtain the week number inside that month (from 1 to 6 potential week number))
Thank you.
Best regards.
Hello,
thanks for your response. I need this to work in a dynamic environment, so i'm not sure if this process (for each day of the month obtain the week number inside that month (from 1 to 6 potential week number) works for this 😞
Correct me if i'm wrong, maybe i misunderstood something?