What's the feeder for this rule?

Post Reply
comma
Posts: 82
Joined: Thu Jun 03, 2010 3:50 am
OLAP Product: Cognos TM1
Version: 9.5.0 64-bit
Excel Version: 2003 SP3

What's the feeder for this rule?

Post 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.
Windows Server 2003 Enterprise x64
Windows XP Pro 2002 SP3
Internet Explorer 7
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: What's the feeder for this rule?

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
comma
Posts: 82
Joined: Thu Jun 03, 2010 3:50 am
OLAP Product: Cognos TM1
Version: 9.5.0 64-bit
Excel Version: 2003 SP3

Re: What's the feeder for this rule?

Post 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.
Windows Server 2003 Enterprise x64
Windows XP Pro 2002 SP3
Internet Explorer 7
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: What's the feeder for this rule?

Post 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.)
Post Reply