Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the below code to calculate previous week number based on current date:
Let vPreviousWeekID = replace(weekname(today(),-1),'/','-W');
trace 'Previous WeekID = ' & $(vPreviousWeekID);
and it gives me this results:
Previous WeekID = & 2017-W15
which is incorrect and it should be: Previous WeekID = & 2017-W17
please give me a suggestion that what is wrong here?
Thanks,
Sandip Ghosh
a) Please define the week numbering you want to use.
b) Please post a small sample QVW with your currently used script.
hi,
One correction :
in Qlikview 12.1 I got: 2017/17 using the expression like this : weekname(today(1))
but in Qliksense 3.1 I have used the same expression, but I got : 2017/16
But, I don't know the why it is happening.
Thanks,
Sandip
hi,
One correction :
in Qlikview 12.1 I got: 2017/17 using the expression like this : weekname(today(1))
but in Qliksense 3.1 I have used the same expression, but I got : 2017/16
But, I don't know the why it is happening.
Also in my Qliksense app the below variables are defined:
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
But I don't know the impact of the variables here.
Thanks,
Sandip
I am using this for Qlik Sense
I got like below, What is your issue
hi,
I am using same Qliksense version 3.1SR4 and I got this:
but I don't know the issue with it.
These variables are most certainly the reason for your different result, since they define a week start and numbering other than ISO.
Have a look at Henric's blog post Peter has linked to in his first answer.