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: 
gustavofred
Contributor II
Contributor II

If im within the last 2 calendar weeks from a date, give back a certain answer

gustavofred_0-1610977615600.png

I tried to visualize it in the image.

I have a special data (lets say 22.02.2021) and i want to give back the answer "yes", if my currently selected CALENDAR WEEK is within the last 2 calendar weeks (red line) from my special date.

i tried something like:

if(special_date>=Date(MakeWeekDate(Year,CW,0)-14) and special_date<Date(MakeWeekDate(Year,CW,6)-7) and ,'Yes','No')

the date is always a fix data, it cant be changed! The CW and the year is variable and is based on a selection.

Any help is appreciated!

0 Replies