vLastYear and vPeriod gets the value based on selection made by the user. If user sets year = 2014 the value is 2013. To accomplish this I use the expression =(GetFieldSelections(Year)-1). The listbox is set to only one possible value selected.
The problem that I am having is that regardless what year I select, it is showing the result for the selected year, not the previous year.
If I change the variable $(vLastYear) with the actual year (f.example 2013), the result is correct.
I have also tried to change the {1< in the set expression to {$<, but this seems not the change anything.
I have checked the value for vLastYear, and it is giving me the correct result (in other words if I choose 2014, the value is 2013).