Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
erwinvullers
Contributor
Contributor

Dimension of the last 4 weeks of the current Year

Hi there,

I made a Qlik Sense App last year to get an overview of the time spend on Customers.

the Dimension I created is as follows:

=IF([Week]>=(Week(Today())-4) AND [Week]<=(week(Today())-1) ,[Week])

Now I noticed that this year also data from last year is shown and I cant figure out how to change this formula so it only shows the weeks of the current year.

already thanks for your time and help.

 

Greetz Erwin. 

1 Reply
y_grynechko
Creator III
Creator III

Hey, try something like that:

IF([Week] >=(Week(Today())-4) AND [Week] <=(week(Today())-1) ,if(Year(Date) = Year(Today()),[Week], null()) ) 

 

Year(Date) - replace 'Date' with the name of the field you take dates from.