Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

variable to retrieve name of a week

Hello I use two variables to calculate sales of this week and the week - 4  my week is like : 

2018_W42

So to calculate the Sales of the actual week I use this : 

text(Year(Today())) & '_W0'& text(Week(Today())) -->result is correct  2019_W01 

and for the week-4 it doesn't work , I use this : 

text(Year(Today())-1) & '_W'& text(Week(Today())-4) -> result is 2019_W-3 and not correct 

 

Thanks for help 

1 Reply
Gysbert_Wassenaar

Try WeekYear(WeekStart(Today(),-4)) & '_W' & Num(Week(WeekStart(Today(),-4)),'00')


talk is cheap, supply exceeds demand