Cell check in a rule

Post Reply
Toto
Posts: 71
Joined: Mon Jul 20, 2009 8:52 am
OLAP Product: TM1
Version: 9.5 Build 9.5.00100.2380
Excel Version: 2003

Cell check in a rule

Post by Toto »

Hello,

I would like to make a colum rule like = 'If the value in a cell is under 30, change the value to 30'.
Tried something like: ['columnA'] = if([columnA]<30,[columnA]=30,continue);

Apparently this is a recursive call and the the rule never ends...

But how can I do this kind of calculation?

Thanks a lot,

Toto
omcleod
Posts: 9
Joined: Tue Apr 07, 2009 6:26 pm
Version: 9.4
Excel Version: 2003

Re: Cell check in a rule

Post by omcleod »

You could use the DB function to check the value in a cell within the same cube:

example:
['columnA'] = N: if(DB(cubename, e1, e2)<30,30,continue);
Toto
Posts: 71
Joined: Mon Jul 20, 2009 8:52 am
OLAP Product: TM1
Version: 9.5 Build 9.5.00100.2380
Excel Version: 2003

Re: Cell check in a rule

Post by Toto »

Got it, thanks a lot!

Toto
User avatar
Steve Rowe
Site Admin
Posts: 2464
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Cell check in a rule

Post by Steve Rowe »

I'm pretty sure this will still create a circular reference

['columnA'] = N: if(DB(cubename, e1, e2)<30,30,continue);

If cubename is the same cube you are writing the rules in

Since at run time either !e1 or !e2 will resolve to 'coulmnA'

The way you have written your rule there's no way to do this (with rules) in TM1.

Is more correct

['columnA','measure2'] =N: if(['measure1']<30,30,continue);

The only way to get the results in the same cell as you are testing would be to process the dataset through TI, but then it would not be live.

HTH
Technical Director
www.infocat.co.uk
Post Reply