Hi Mirza,
You can't use the same text variable for displaying previous periods, you need to create as many text variables as the number of periods you want to display. For each of them you can use offset values such as for previos month use -1. For previous year create another text variable the same way you define the other, just with a difference that you use offset as -12.
Hope it helps
Yasemin.