Page 1 of 1

What's the feeder for this rule?

Posted: Sun Jul 04, 2010 10:23 am
by comma
Hi,
I'm really new to Rules and Feeders. I've tried to a write a rule in my I/S Variance cube, which is pulling numbers from Expense Variance cube.
Here's the rule I wrote:

Code: Select all

[{'4757','4950','5910','5920','5930','6050','6060'},'Currency Var',{'3066','1616','1670','2073','2074','3212','3239','Other Adjustment'}] = N:
IF(!Reporting Currency@='RC USD',
	IF(!Entity @= 'Other Adjustment',
		DB('Expense Variance',!Year,!Budget Period,'RC USD',IF(!Income Statement Account@='4757','Distribution',
								   	IF(!Income Statement Account@='4950','FME',
										IF(!Income Statement Account@='5910','MBBF - 5910',
											IF(!Income Statement Account@='5920','MBBF - 5920',
												IF(!Income Statement Account@='5930','MBBF - 5930',
													IF(!Income Statement Account@='6050','G&A',
														'R&D'

								))))))
			,'Adjustment','Currency Var',!Month)

		,DB('Expense Variance',!Year,!Budget Period,'RC USD',IF(!Income Statement Account@='4757',!Entity | ' Distribution',
								   	IF(!Income Statement Account@='4950',!Entity | ' FME',
										IF(!Income Statement Account@='5910',!Entity | ' MBBF - 5910',
											IF(!Income Statement Account@='5920',!Entity | ' MBBF - 5920',
												IF(!Income Statement Account@='5930',!Entity | ' MBBF - 5930',
													IF(!Income Statement Account@='6050',!Entity | ' G&A',
														!Entity | ' R&D'

								))))))
			,'All Expense Accounts','Currency Var',!Month)
	),
	CONTINUE
);
But now I'm confused in writing the right feeder for this rule. Can someone help me?
Sorry if I'm asking too much.

Re: What's the feeder for this rule?

Posted: Mon Jul 05, 2010 4:54 am
by Martin Ryan
Hi comma,

You'd be much better to do this with attributes. Load up the account mapping as an attribute, say "Account Map", then rewrite your rule

[{'4757','4950','5910','5920','5930','6050','6060'},'Currency Var',{'3066','1616','1670','2073','2074','3212','3239','Other Adjustment'}] = N:
IF(!Reporting Currency@='RC USD',
IF(!Entity @= 'Other Adjustment',
DB('Expense Variance',!Year,!Budget Period,'RC USD',
attrs('Income Statement Account', !Income Statement Account, 'Account Map')
,'Adjustment','Currency Var',!Month)
,DB('Expense Variance',!Year,!Budget Period,'RC USD',
!Entity | ' ' | attrs('Income Statement Account', !Income Statement Account, 'Account Map')
,'All Expense Accounts','Currency Var',!Month)
),
CONTINUE
);

Your feeder is then very similar on the other side, except you'll need to have attributes in the Account dimension from the other cube that map to the elements you've mentioned in the Income Statement Account dimension.

Also, where your entity and account are together in the Expense Variance you'll need to split it out, e.g.
['Currency Var'] => DB('DestnCube', !Year, !BudgetPeriod, ... attrs('Expense Account', !Expense Account, 'Income Statement Ac Map'), ... 'Entity Consolidation that includes all the entities you've mentioned');
and
['Currency Var'] => DB('DestnCube', !Year, !BudgetPeriod, ... attrs('Expense Account', !Expense Account, 'Income Statement Ac Map'), ...subst(!Expense Account', 1, 4));

Obviously this is all just "for example", you won't be able to cut and paste this into your rules you'll need to apply the idea to your circumstances.

Martin

Re: What's the feeder for this rule?

Posted: Tue Jul 06, 2010 11:28 am
by comma
Hi Martin,

Thanks for the reply.
I understand your approach, but in case I want to stick to the hard-coded one, are the following feeders correct?

Code: Select all

['Adjustment','RC USD','Distribution','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','4757','Currency Var');

['Adjustment','RC USD','FME','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','4950','Currency Var');

['Adjustment','RC USD','G&A','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','6050','Currency Var');

['Adjustment','RC USD','MBBF - 5910','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','5910','Currency Var');

['Adjustment','RC USD','MBBF - 5920','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','5920','Currency Var');

['Adjustment','RC USD','MBBF - 5930','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','5930','Currency Var');

['Adjustment','RC USD','R&D','Currency Var']=>
   DB('Income Statement Variance','Base',!Year,!Budget Period,!Month,'Other Adjustment','RC USD','6060','Currency Var');
I want to know the correct feeders for the hard-coded rules just so I can understand rules and feeders better.
Thanks a lot for the help.

Re: What's the feeder for this rule?

Posted: Tue Jul 06, 2010 1:51 pm
by lotsaram
The direction Martin has pointed you is definitely the way to go, I would advise the same thing. Using attribute to map your account pairs will vastly simplify both the rule and feeders and also make the system much easier to maintain as there is then no need to hard code in an new account pairing, simply add the attribute values and everything will work.

The only person who can know if the mappings and therefore the feeders are correct is you.
Income statement account 4757 maps to Distribution therefore this is fed from Distribution in the Expense Variance cube. This is correct (I haven't looked at all the other dimensionality as I don't have time right now.)