Hi Carine,
Use the below formula to show the previous 12 months
Numbervar Yr :=ToNumber(Left({?My Parameter},4));
NumberVar Mn :=ToNumber(Right({?My Parameter},2));
Numbervar i:=0;
Datevar dt:= Cdate(Yr,Mn,1);
StringVar tt:="" ;
for i :=1 to 12 do
tt:= tt+ Totext(Year(dateadd("m",-i, dt)),0)&Totext(Month((dateadd("m",-i, dt))),0)+CHR(32);
tt;
P.S: Replace the {?My Parameter} field with your YearMonth input field.
The above formula will shows all the previous YearMonth values in a single Text box,
if you want to treat those values as separete then you need to load those values to an Array based on Space(chr(32)) value.