Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
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
Partner - Champion III
Partner - Champion III

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


talk is cheap, supply exceeds demand