Hi,
There is a code available for standard SAP variable YTD for 0CALYEAR. You can use the same code and replace 0CALYEAR with Fiscal Period.
But i think you should do this at BeX level using customer exit because given the data volume in your cube it will eat up significant amount of time
Check this also.
SAP Standard BEx Variable for YTD
Thanks
Nayab