TM1 Dynamic Aliases – changes not being picked up by feeders
Posted: Thu Jul 17, 2014 7:17 pm
Version: 10.2 FP1
Note: I have attached the issue with screenshots in a Word doc so it is easier to understand.
I have a dimension called “RollingMonths” consisting of month offset keys. Its alias is the actual month name and year for the current state. It is updated using rules that reference 1. An assumptions cube that defines the current month and 2. the Months dimension to figure out the month names of the offset months.
As a test I have hardcoded some feeders from the Assumptions cube to each element in this cube to ensure they are being fed. When using zero suppression all values show up correctly.
[{'OPEX Current Month','OPEX Current Year'},'Value']=>
DB('}ElementAttributes_RollingMonths','m-1','Description'),
DB('}ElementAttributes_RollingMonths','m-2','Description'), …etc
I have an Input cube that uses the RollingMonths dimension along with other dimensions (let’s call them Dim 1, Dim 2). The input cube displays Budget and Actuals scenarios that are rule derived from a Master cube and also has a scenario Forecast that is editable. The Master cube has dimensions Years, Months, Dim 1, Dim 2 – so it is the same structure as the Input cube only a different time dimension. The Master cube values are updated via process and the only rules are feeders to the Input cube.
Input Cube Rule:
[]=N:
IF(!FCST_Scenario @= 'Current Forecast', CONTINUE,
DB('OPEX Fcst vs Bud vs Act Cube',
SUBST( ATTRS('RollingMonths',!RollingMonths,'Description'),5,4 ),
SUBST( ATTRS('RollingMonths',!RollingMonths,'Description'),1,3 ),
!Date_Type,!Hierarchy_DualTree,!Account_Group,!FCST_Scenario, !FCST_Measures)
);
Master Cube Feeder:
['Activity Date','Budget','Net Amount']=>
DB('OPEX Forecast Input Cube',
( ATTRS('Months',!Months,'Month Short Name') | ' ' |!Years ),
'Activity Date',!Hierarchy_DualTree,!Account_Group,'Budget','Net Amount');
The Issue:
As an example – let’s say the current month is May.
At the end of each month, the process is to update the current month to June – which will shift all the alias names in the RollingMonths dimension. The }ElementAttributes_RollingMonth Cube updates successfully, but when I look at the Check Feeders statement for Budget in Jan, it still points to m-4 which according to the }ElementAttributes_RollingMonth Cube is the element name for the alias Feb 2014.
The other thing that happens is when I run a process that copies data from the Master Cube to the Input Cube, it also copies January data to Feb 2014 (or m-4), February data to Mar 2014 (or m-3) as per the prior mapping state. The following is the code in the TI process, where V1 is Years and V2 is Months.
vRollingMonthTarget = ATTRS('Months', V2, 'Month Short Name') | ' ' | V1;
ValueN = CellGetN(vSourceCube,V1, V2, V3, V4, V5, vCopyFromElement, V7);
CellPutN(ValueN,vTargetCube, vRollingMonthTarget, V3, V4, V5, vCopyToElement, V7);
I have found some things that work. I created a dummy cube that included the element name and alias as values.
If I click recalculate on this cube after a month change, I see the correct mappings. AND my TI process and feeders work correctly. They have no connection to this cube other that the fact that they pull the rolling months information from the same source (ie }ElementAttributes_RollingMonths).
My current solution:
If I recompile the dimension by adding a dummy element, saving it and then deleting the element – then everything works as it should. I am using this method as well because I can code it into a TI process and have it scheduled.
If anyone can explain to me what is happening behind the scenes in TM1 that is causing this issue and/or provide me with a more elegant solution it would be greatly appreciated!
Thanks for your time!
Note: I have attached the issue with screenshots in a Word doc so it is easier to understand.
I have a dimension called “RollingMonths” consisting of month offset keys. Its alias is the actual month name and year for the current state. It is updated using rules that reference 1. An assumptions cube that defines the current month and 2. the Months dimension to figure out the month names of the offset months.
As a test I have hardcoded some feeders from the Assumptions cube to each element in this cube to ensure they are being fed. When using zero suppression all values show up correctly.
[{'OPEX Current Month','OPEX Current Year'},'Value']=>
DB('}ElementAttributes_RollingMonths','m-1','Description'),
DB('}ElementAttributes_RollingMonths','m-2','Description'), …etc
I have an Input cube that uses the RollingMonths dimension along with other dimensions (let’s call them Dim 1, Dim 2). The input cube displays Budget and Actuals scenarios that are rule derived from a Master cube and also has a scenario Forecast that is editable. The Master cube has dimensions Years, Months, Dim 1, Dim 2 – so it is the same structure as the Input cube only a different time dimension. The Master cube values are updated via process and the only rules are feeders to the Input cube.
Input Cube Rule:
[]=N:
IF(!FCST_Scenario @= 'Current Forecast', CONTINUE,
DB('OPEX Fcst vs Bud vs Act Cube',
SUBST( ATTRS('RollingMonths',!RollingMonths,'Description'),5,4 ),
SUBST( ATTRS('RollingMonths',!RollingMonths,'Description'),1,3 ),
!Date_Type,!Hierarchy_DualTree,!Account_Group,!FCST_Scenario, !FCST_Measures)
);
Master Cube Feeder:
['Activity Date','Budget','Net Amount']=>
DB('OPEX Forecast Input Cube',
( ATTRS('Months',!Months,'Month Short Name') | ' ' |!Years ),
'Activity Date',!Hierarchy_DualTree,!Account_Group,'Budget','Net Amount');
The Issue:
As an example – let’s say the current month is May.
At the end of each month, the process is to update the current month to June – which will shift all the alias names in the RollingMonths dimension. The }ElementAttributes_RollingMonth Cube updates successfully, but when I look at the Check Feeders statement for Budget in Jan, it still points to m-4 which according to the }ElementAttributes_RollingMonth Cube is the element name for the alias Feb 2014.
The other thing that happens is when I run a process that copies data from the Master Cube to the Input Cube, it also copies January data to Feb 2014 (or m-4), February data to Mar 2014 (or m-3) as per the prior mapping state. The following is the code in the TI process, where V1 is Years and V2 is Months.
vRollingMonthTarget = ATTRS('Months', V2, 'Month Short Name') | ' ' | V1;
ValueN = CellGetN(vSourceCube,V1, V2, V3, V4, V5, vCopyFromElement, V7);
CellPutN(ValueN,vTargetCube, vRollingMonthTarget, V3, V4, V5, vCopyToElement, V7);
I have found some things that work. I created a dummy cube that included the element name and alias as values.
If I click recalculate on this cube after a month change, I see the correct mappings. AND my TI process and feeders work correctly. They have no connection to this cube other that the fact that they pull the rolling months information from the same source (ie }ElementAttributes_RollingMonths).
My current solution:
If I recompile the dimension by adding a dummy element, saving it and then deleting the element – then everything works as it should. I am using this method as well because I can code it into a TI process and have it scheduled.
If anyone can explain to me what is happening behind the scenes in TM1 that is causing this issue and/or provide me with a more elegant solution it would be greatly appreciated!
Thanks for your time!