Rule to Write except one element

Post Reply
mail_kupi
Posts: 22
Joined: Wed Jan 26, 2011 3:06 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003

Rule to Write except one element

Post by mail_kupi »

Hi all,

i have price in january, and then i want to use rule to write price in february based on january.
this rule is in one cube.

i try to write this

['Price'] = ['Price','Jan']

is it any rule to write price except januari?
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: Rule to Write except one element

Post by lotsaram »

Code: Select all

['Measure':'Price'] = N:
IF( !Month @= 'Jan',
  STET,
  ['Month':'Jan']
);
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

Re: Rule to Write except one element

Post by kpk »

As far as I remember there are samples in the Rules Guide for this issue.

Try:
['Price','Jan']=STET;
['Price'] = ['Price','Jan'];

or

['Price']=IF(!month@='Jan',STET,['Jan']);
Best Regards,
Peter
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

Re: Rule to Write except one element

Post by kpk »

lotsaram wrote:

Code: Select all

['Measure':'Price'] = N:
IF( !Month @= 'Jan',
  STET,
  ['Month':'Jan']
);
... and as you can see from this code you probably need N: in the rule and a separate C: rule to calculate the average Price at C levels.
Best Regards,
Peter
mail_kupi
Posts: 22
Joined: Wed Jan 26, 2011 3:06 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003

Re: Rule to Write except one element

Post by mail_kupi »

Thanks a lot guys, it solve my problem.
i will read the Rules Guide more carefully :)
User avatar
garry cook
Community Contributor
Posts: 209
Joined: Thu May 22, 2008 7:45 am
OLAP Product: TM1
Version: Various
Excel Version: Various

Re: Rule to Write except one element

Post by garry cook »

As an aside, based on what you're asking, I would guess that your next problem is likely to be passing balances from one month to the next and feeding them correctly. General practice is to use a Last Month / Next Month pair of attributes and drive the rules and feeders off these. ie, Sales = DB('Sales',ATTRS('Month',!Month,'Last Month'); Sales => DB('Sales',ATTRS('Month',!Month,'Next Month') type of statements.

Yeah, I'm bored ;)
Post Reply