I feel your pain on the rounding issue. I encountered this when I first started using TM1 back in 1995. My employer back then bought TM1 to do financial consolidations and as a bank, we were accustomed to preparing all our financial reports rounded to thousands. However, the requirement was that all financial statements had to foot, meaning we couldn't just round in the formatting because often times the numbers wouldn't add up. Back then my solution was to pick a specific child of each parent to hold the rounding difference, a plug if you will, so that the financial statements would foot. Then I hard-coded these elements in the rules to make these children equal the difference between the rounded parent and the sum of all the other rounded siblings. This works fine but it's rather ugly and may require maintenance any time the financial statement line items change. This may be your best option if you are relatively unsophisticated with TM1.
After I became more experienced with TM1 I devised a more dynamic solution to the rounding problem. The scheme involves adding a new dimension to the cube, call it Rounding, with a leaf element called Raw (where the raw data is stored) and then elements to hold the numbers rounded, as well as elements to hold the adjustments to make sure everything foots. You need multiple steps in the tree, depending on how many levels your account structure contains. It would look something like this picture:
The next thing you need is attributes on the Account dimension. One for the account number of the element which will hold the rounding adjustments (the attribute will be populated for each parent in the account hierarchy) and then an attribute to hold the name of the parent (will be populated for the accounts designed as holding a rounding adjustment). You will need a parent attribute for each level in the hierarchy like Level_1_Parent, Level_2_Parent, Level_3_Parent, etc.
Then the rules look like this. The first rule rounds the raw balances to 1000.
Code: Select all
['Rounding_Level_0']=N:ROUNDP(['Raw']\1000,0);
Then you have a rule for each level in the tree beyond 1:
Code: Select all
['Rounding_Adj_Level_1']=N:
IF(!Account@=ATTRS('Account',ATTRS('Account',!Account,'Level_1_Parent'),'Rounding_Account'),
ROUNDP(DB('Income_Statement',!Version,'Raw',!Org,ATTRS('Account',!Account,'Level_1_Parent'),!Period,!Measure)\1000,0)-
DB('Income_Statement',!Version,'Rounding_Level_0',!Org,ATTRS('Account',!Account,'Level_1_Parent'),!Period,!Measure),
0);
You would repeat this rule until you get to the top level in the account hierarchy. Then the rule is (assuming hierarchy has 5 levels and top level element is “Net Income”):
Code: Select all
['Rounding_Adj_Final']=N:
IF(!Account@=ATTRS('Account',ATTRS('Account',!Accounts,'Level_5_Parent'),'Rounding_Account'),
DB('Income_Statement',!Version,'Rounding_Level_4',!Org,'Net Income (Loss)',!Periods,!Measures)-
['Net Income', ‘Rounding_level_0’],
0);
Lastly, you need to feed:
Code: Select all
['Raw']=>['Round_is':'Rounding_Level_0'];
['Raw']=>DB(IF(ATTRS('Account',!Account,'Level_1_Parent')@='','','Income_Statement'),!Version,'Rounding_Adj_Level_1',!Org,!Account,!Period,!Measure);
['Raw']=>DB(IF(ATTRS('Account',!Account,'Level_2_Parent')@='','','Income_Statement'),!Version,'Rounding_Adj_Level_2',!Org,!Account,!Period,!Measure);
['Raw']=>DB(IF(ATTRS('Account',!Account,'Level_3_Parent')@='','','Income_Statement'),!Version,'Rounding_Adj_Level_3',!Org,!Account,!Period,!Measure);
['Raw']=>DB(IF(ATTRS('Account',!Account,'Level_4_Parent')@='','','Income_Statement'),!Version,'Rounding_Adj_Level_4',!Org,!Account,!Period,!Measure);
['Raw']=>DB(IF(ATTRS('Account',!Account,'Level_5_Parent')@='','','Income_Statement'),!Version,'Rounding_Adj_Final',!Org,!Account,!Period,!Measure);
The end result of all of this is that now your financial statements will foot at the whole dollar level (Raw) and when rounded (Rounding_Final).