Is there a way to restrict a calculation to two specific levels using a rule.
Right now I have a formula to determine what percent of people want to buy different flavors of ice cream
['Purchase%_Total']=C:['IcecreamSold_Units']\['IcecreamAvail_Units'];
I want to restrict the C: calculation to levels 4 and 3 of my [SKU] dimension and force the result of 3 into levels 2 and 1 and 0.
Is this possible everything I have read seems to indicate that it's either all Consolidated Levels, Just the N level or Everything.
CBerg
Rules Question on Calculation by Level
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Rules Question on Calculation by Level
You can use an if statement and ELLEV function on the right hand side.
Declan Rodger
-
- 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: Rules Question on Calculation by Level
Read up on the rules function ELLEV.
Re: Rules Question on Calculation by Level
Great thanks I can isolate the levels
['Purchase%_Total']=IF(ELLEV('d.sku',!d.SKU)>2,['IcecreamSold_Units']\['IcecreamAvail_Units'],[ELLEV('d.sku',!d.SKU)=3,'IcecreamSold_Units']\ELLEV[d.sku',!d.SKU)=3'IcecreamAvail_Units']));
What I am struggling with is how to push the level 3 results into levels 2 through 0.
Chris
['Purchase%_Total']=IF(ELLEV('d.sku',!d.SKU)>2,['IcecreamSold_Units']\['IcecreamAvail_Units'],[ELLEV('d.sku',!d.SKU)=3,'IcecreamSold_Units']\ELLEV[d.sku',!d.SKU)=3'IcecreamAvail_Units']));
What I am struggling with is how to push the level 3 results into levels 2 through 0.
Chris
-
- 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: Rules Question on Calculation by Level
Here's the issue in a nutshell: In TM1 Rules, just like formulas in Excel, you don't write formulas to push something down, you write formulas to pull something in. For example, if you had an empty cell in Excel, let's say C3, and you wanted to pull into it the value from A1 (the same thing as pushing the value from A1 to C3) you wouldn't write the formula in A1 and say "push this down to C3"? No, you would write the formula in C3 and say "pull in from A1".cberg wrote:What I am struggling with is how to push the level 3 results into levels 2 through 0.
Your example is the same. Instead of pushing down you need to pull in. For levels 0, 1, and 2, you need to write your formula to pull in from their respective parents, working your way up the chain to levels 3 and 4. Something like this:
Code: Select all
['Purchase%_Total']=IF(ELLEV('d.sku',!d.SKU) < 3, DB(CubeName, !Dim1, !Dim2, !Dimn, !d.SKU, ELPAR('d.SKU, !d.SKU,1), 'Purchase%_Total');