Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Offset Week in Expression

Hi there

Can anyone help me with this one, basically due to the way we calculate the years week numbers this year has a week 1 but last year did not.  The desire is to she week one TY but against Week 2 from last year numbers.

I cannot change the week on the source data and as a result have been working with set analysis.

On one instance where the user had to select a week i used the below :-

=sum({$Year = {$(=max(Year)-1)}, Week = {$(=getfieldselections(Week)+1)}>} sales)

However I am now trying to do the same offset but on a pivot chart where i have weeks in columns.

I tried to do a similar set analysis but with no joy .....

Avg({$<Year = {$(=max(Year)-1)}, Week = {$(=Week+1)} >} sales)

Community Browser