I'm trying to write a rule that takes adjustments but only puts these into a start year and future years specified in an assumptions cube
I have some elements in my assumptions:
- ‘Assumptions','Forecast','No year','Full year','Planning Cube Base year' = 2012 (sting value)
‘Assumptions','Forecast','No year','Full year','Planning Number of Years = 3 (numeric)
['Current Plan','Adjustment to Reforecast $'] = N:
Code: Select all
# If Planning year ignore (STET)
IF(!Year @= DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year'),STET,
# If year larger than planning year smaller than planning year plus number of plan years populate from planning year amount, otherwise the value is zero
IF(((DIMIX('Year',!Year)> DIMIX('Year',DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year')))
& (DIMIX('Year',!Year)<= DIMIX('Year',DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year'))+ DB('Assumptions','Forecast','No year','Full year','Planning Number of Years'))
), ['Current Plan', year:'2012', 'Adjustment to Reforecast $'],
0
)
);
This works fine but the issue is the I need to hardcode the Adjustment to Reforecast $ data I’m flowing into it. Currenlty hard set to 2012.
Ideally I would like to dynamically apply this['Current Plan', year:'2012', 'Adjustment to Reforecast $']
Something like this but I just can’t seem to get my syntax correct. Is this possible or am I way wrong here?
Code: Select all
['Current Plan','Adjustment to Reforecast $'] = N:
IF(!Year @= DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year'),STET,
IF(((DIMIX('Year',!Year)> DIMIX('Year',DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year')))
& (DIMIX('Year',!Year)<= DIMIX('Year',DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year'))+ DB('Assumptions','Forecast','No year','Full year','Planning Number of Years'))
), ['Current Plan', year: DB('Assumptions','Forecast','No year','Full year','Planning Cube Base year'), 'Adjustment to Reforecast $'],
0
)
);