HI,
no need for the code your senario.
put the 0CALMONTH object in column panel
and create the 3 KF if you want
-Billing Qty for last 12 months - resctirct the 0calmont use the offset variable -12
-Billing Qty for Last 6 months - resctirct the 0calmont use the offset variable -6
-Billing Qty for last 3 months - resctirct the 0calmont use the offset variable -3
check the out put in RSRT.
Thanks,
Phani.