Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous YearWeek of the current date in script

Hi all,

I am trying to filter data to fetch only records from the previous year week of the current date. Till now I managed to do it hard coded at following:

WeekYear(Timekey) & right('00' & week(weekstart(Timekey)),2) = '201544'

Is it possible to swap '201544' to a function that return the previous yearweek of the current date without hardcoding the value. I cannot find anything regarding how this can be done.



1 Reply
Partner - Specialist III
Partner - Specialist III

If I understand your issue correctly, the weekstart(Timekey, -1) should do the trick.