Hi,
I'm trying tu build a simple rule doing something like ['measure']=C:min(1,['measure'});
(if at least one of my child value is 1, my value is 1, else 0)
it does not work, i got 'N/A' for consolidated levels (I assume it is because ['measure'] is defined by ['measure'] which does not please tm1).
I can do what i want if i create ['measure2']=C:min(1,['measure']);
but I do no want to create a specific measure for it.
Any way I can do what I want without create another measure ?
Thx,
Stéphane
Consolidated rule question
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Consolidated rule question
In TM1 rules syntax, what you have created results in a circular reference and will not work. The only way I know of, without creating something really convoluted, is the use the second measure.
-
- Posts: 74
- Joined: Thu Jun 17, 2010 10:35 am
- OLAP Product: TM1
- Version: 9.4 9.5.1
- Excel Version: 2003 - 2007
Re: Consolidated rule question
Hi Stephane,
you should try with consolidate children function with a condition to do that:
you should try with consolidate children function with a condition to do that:
Code: Select all
['measure']= C:IF( ConsolidateChildren('<<measure_dimension>>') > 0, 1, 0 );
-
- 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: Consolidated rule question
Actually as per Stephane's example it would berozef wrote:Hi Stephane,
you should try with consolidate children function with a condition to do that:
Code: Select all
['measure']= C:IF( ConsolidateChildren('<<measure_dimension>>') > 0, 1, 0 );
Code: Select all
['measure']= C:IF( ConsolidateChildren('<<measure_dimension>>') < 1, ConsolidateChildren('<<measure_dimension>>'), 1 );
-
- Posts: 74
- Joined: Thu Jun 17, 2010 10:35 am
- OLAP Product: TM1
- Version: 9.4 9.5.1
- Excel Version: 2003 - 2007
Re: Consolidated rule question
I'm not sure of that...lotsaram wrote:Actually as per Stephane's example it would beCode: Select all['measure']= C:IF( ConsolidateChildren('<<measure_dimension>>') < 1, ConsolidateChildren('<<measure_dimension>>'), 1 );
Sorry I havn't. I was just giving an idea.lotsaram wrote:but I'm not 100% sure on this have you tested?
Personnaly, I never had any performance issue with this function, altough I used it for an algorithm of notation with about 1k society.rozef wrote:it's a bad idea in terms of performance and ConsolidateChildren should be avoided wherever possible
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Consolidated rule question
I kind of get the feeling here that the leaf values are guaranteed to be either 1 or 0 and this is trying to do a consolidated logical OR.
If that is the case then the ConsolidatedMax should do it fine. If your measure can take other values at the leaf level and you really are trying to identify if any of them are 1 then I fear you will need another measure, e.g.
ConsolidatedMax does not suffer from the performance problems that affect ConsolidateChildren because it works directly from the leaf descendents and not the direct children and so it can be sensitive to feeders.
If that is the case then the ConsolidatedMax should do it fine. If your measure can take other values at the leaf level and you really are trying to identify if any of them are 1 then I fear you will need another measure, e.g.
Code: Select all
['MeasureIsOneSomewhere'] = N: If ( 1 = ['Measure'], 1, 0 ); C: ConsolidatedMax( 0, 'cubename', !dim1, !dim2, ..., !measures );
ConsolidatedMax does not suffer from the performance problems that affect ConsolidateChildren because it works directly from the leaf descendents and not the direct children and so it can be sensitive to feeders.