Manage stock accounts
Posted: Mon Aug 03, 2009 9:40 am
Hello,
I have to use stock accounts (ie : amounts of money) in a TM1 cube but I don't really know how to aggregate them on TotalYear.
The only way I found is to use a numeric attribute on my Period dimension called 'CurrentMonth'.
On this attribute I put 1 on the CurrentMonth, then I can calculate TotalYear in a rule as below :
['TOTYEAR'] = C:
IF ( ATTRS('OBP_Accounts', !OBP_Accounts, 'Type') @= 'STOCK',
IF (['M12'] = 0,
['M01']*ATTRN('ALL_Period', 'M01', 'CurrentMonth')
+['M02']*ATTRN('ALL_Period', 'M02', 'CurrentMonth')
+['M03']*ATTRN('ALL_Period', 'M03', 'CurrentMonth')
+['M04']*ATTRN('ALL_Period', 'M04', 'CurrentMonth')
+['M05']*ATTRN('ALL_Period', 'M05', 'CurrentMonth')
+['M06']*ATTRN('ALL_Period', 'M06', 'CurrentMonth')
+['M07']*ATTRN('ALL_Period', 'M07', 'CurrentMonth')
+['M08']*ATTRN('ALL_Period', 'M08', 'CurrentMonth')
+['M09']*ATTRN('ALL_Period', 'M09', 'CurrentMonth')
+['M10']*ATTRN('ALL_Period', 'M10', 'CurrentMonth')
+['M11']*ATTRN('ALL_Period', 'M11', 'CurrentMonth')
+['M12']*ATTRN('ALL_Period', 'M12', 'CurrentMonth'),
['M12']
),
CONTINUE
);
I am not very satisfied with this solution, so I wondering is someone has already fix this issue.
Thank you
StoneDX
I have to use stock accounts (ie : amounts of money) in a TM1 cube but I don't really know how to aggregate them on TotalYear.
The only way I found is to use a numeric attribute on my Period dimension called 'CurrentMonth'.
On this attribute I put 1 on the CurrentMonth, then I can calculate TotalYear in a rule as below :
['TOTYEAR'] = C:
IF ( ATTRS('OBP_Accounts', !OBP_Accounts, 'Type') @= 'STOCK',
IF (['M12'] = 0,
['M01']*ATTRN('ALL_Period', 'M01', 'CurrentMonth')
+['M02']*ATTRN('ALL_Period', 'M02', 'CurrentMonth')
+['M03']*ATTRN('ALL_Period', 'M03', 'CurrentMonth')
+['M04']*ATTRN('ALL_Period', 'M04', 'CurrentMonth')
+['M05']*ATTRN('ALL_Period', 'M05', 'CurrentMonth')
+['M06']*ATTRN('ALL_Period', 'M06', 'CurrentMonth')
+['M07']*ATTRN('ALL_Period', 'M07', 'CurrentMonth')
+['M08']*ATTRN('ALL_Period', 'M08', 'CurrentMonth')
+['M09']*ATTRN('ALL_Period', 'M09', 'CurrentMonth')
+['M10']*ATTRN('ALL_Period', 'M10', 'CurrentMonth')
+['M11']*ATTRN('ALL_Period', 'M11', 'CurrentMonth')
+['M12']*ATTRN('ALL_Period', 'M12', 'CurrentMonth'),
['M12']
),
CONTINUE
);
I am not very satisfied with this solution, so I wondering is someone has already fix this issue.
Thank you
StoneDX