Need help for feeding rolling prior periods
Posted: Mon Aug 04, 2014 6:57 am
Hi experts,
I am working on calculating a 12 month average for the last 12 months from the current period.
My time hierarchy looks like:
-(Year)
-- Q12014
--- Jan14
--- Feb14
--- Mar14
-- Q22014
and so on..
When I am checking the feeder at the Consolidated level (for example: 'All Regions'), it shows 'not fed'
I wasn't sure where else the value needs to be fed.
Here I am posting the sample code for the above calc:
Let me know if I m missing anything..
Do i need to feed the period as well to the calculated field? ( I don't think its needed
)
I am working on calculating a 12 month average for the last 12 months from the current period.
My time hierarchy looks like:
-(Year)
-- Q12014
--- Jan14
--- Feb14
--- Mar14
-- Q22014
and so on..
When I am checking the feeder at the Consolidated level (for example: 'All Regions'), it shows 'not fed'
I wasn't sure where else the value needs to be fed.
Here I am posting the sample code for the above calc:
Code: Select all
skipcheck;
['12MonthAvg'] =N:
if(dimix('Time Period', !Time Period)<=12,Stet,
(DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-1), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-2), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-3), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-4), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-5), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-6), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-7), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-8), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-9), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim, 'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-10), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim,'Revenue_meas1')+
DB('TestCube1', !Version,Dimnm('Time Period', Dimix('Time Period', !Time Period)-11), !Entity, !Region, !Domain, !NCC,
!EleGroup, !Account, !CurrencyDim,'Revenue_meas1')+
)\12);
feeders;
['Revenue_meas1'] => ['12MonthAvg'];
Do i need to feed the period as well to the calculated field? ( I don't think its needed
