Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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)

0 Replies