Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview and week 53 year 2016?

Hello!

I am having a big trouble with my QlikView viz.

The viz is showing now weekly based trendlines and we are compering lines between years.

The problem is that the year 2016 line continues all the way to the week 53, that obviously has not yet reached for this year.

This is some ISO-date problems within the program.. Is there any solutions how this can be fixed?

I am using the QlikView Mastercalendar code to generate dates based on my own datefield.

week.png

The orange line is the problem here... The straight line from week 11 to the week 53 should not be there.

Cheers,

Niko

14 Replies
Not applicable
Author

Hello,

I attached a new file. On this file you can find on the right upper corner my issue with the three expressions. It just continues to the the week 53.

Cheers,

Niko

Not applicable
Author

In your expression you are still referring to the Year (based on month) instead of the Year of the week (in your example defined as WeekYear2) for your Set Analysis. If you are referring to WeekYear2 instead, everything should work fine:

=if(isNull(GetFieldSelections(WeekYear2)),sum({<WeekYear2={"$(vMaxYear)"}, Week=>} Value), sum({<WeekYear2={$(=Max(Vuosi))}, Week=>} Value))

swuehl
MVP
MVP

Hi Niko,

I think you should also use a WeekYear field in your set expression field modiifer then:

=if(isNull(GetFieldSelections(Year)),sum({<WeekYear2={"$(vMaxYear)"}, Week=>} Value), sum({<WeekYear2={$(=Max(Vuosi))}, Week=>} Value))

Maybe your GetFieldSelections should also check on a WeekYear field, not sure what this expression should actually do.

Not applicable
Author

Hello swuehl,

Well that indeed does the trick! Now I have to wonder should I use that to all my expressions and calculations or only in this chart.. There would be many expressions to change here, but that truly did change it.

I had to create WeekYear field on the editor load for this just from the temdate, just like you had done.

The if(isnull) check is just for there if user has done any selections or not. If not, then we show max year and if he makes year selections we show the max year from those selections. For example the selection is 2002-2005, we show 2005 on this line.

Cheers,

Niko

stantrolav
Partner - Creator II
Partner - Creator II

num(Week(DateNum), '00') as CalWeek52,

num(if(Week(DateNum) = 1 and Month(DateNum) = 12, 53, if(Week(DateNum) = 53 and Month(DateNum) = 1, 1,Week(DateNum))), '00') as CalWeek53,