Sunny's solution perhaps is not working because the Autogenerate Year field is a dual with Text and Date. If you see the definition it states:
Dual(Year($1), YearStart($1)) AS [Year]
So, if you MAX and -1, it will bring you last day of previous year.
You need to work with formulas like Year() if you want to have the set analysis in TEXT, o YearStart() if you want to use the set analysis with date (the num part of the dual).
Not sure if Qlik will "fix" this dual field, so be carefull for what changes may happen in the future.
So, i guess something like this should work on your variable:
The first example on the SetAnalysis you will need to say '$(VpreviouseYear)' because it will be text. On the second one it will be a date.
I hope this helps.