Hi Praveen,
Can you explain your requirement in detail.
I am have a doubt about what you have posted. Do you mean if user enters 2012.01 then you will have 12 last consecutive months and if they enter 2011.01 you will have 24 last consecutive months. If the number of columns will change then it will not work with offset.
If that is not the case then you need to define offset on a variable. The columns will take the values of respective months.
Please ask if not clear.
Regards,
Sujit.