Thanks, so we need to create a function and then call that from report. I have doubt in this, for example if the user enter 'SEP-12' then it will find which QTR from the case statement. But if the user have account number which is available in all the months from 2010 - 2012.
So now user will give two inputs like period_name='SEP-12' and Account Number=101010 then it should give output like sum(Q3) in the year of 2012. Here how it will calculate year wise? or do we need to specify any condition here?
How about having a proper time dimension with a quarter level which automatically aggregates you the data on each level needed and allows you to create level-based measures and do proper time-series calculations in the RPD already?
Might be a good idea and definitely more re-usable and robust than pure calcs and CASE WHEN's...