Hi ,
I am a beginner with writing tm1 rules and I am working with a Cube which has Mexico and US Sales Data .
SO basically we have a currency dimension which has values like Input Currency , Company CodeCurrency and USD .
USD refering to all in USD .
For Mexico - Input and Company code are Mexico and USD is converted to USD
For US - everything is USD .
My rules are
['Global Margin', Currency:'USD'] = ['Full Revenue'] - ['INC Standard Cost'];
This exist only for Currency Type USD meaning all calculations are done only at USD .
so should my feeders for the above rule be
1) Just ['Full Revenue'] => ['Global Margin'];
or ['Full Revenue'] => ['Global Margin',Currency :'USD'];
Is any of the above correct , if so why that is correct .
Ideally i dont want to see any value for local currency or company code currency for global margin.
Thanks,
Feeders for Rules
-
- Posts: 128
- Joined: Tue May 23, 2017 12:45 pm
- OLAP Product: Tm1
- Version: 9.5
- Excel Version: 2010
-
- MVP
- Posts: 3113
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Feeders for Rules
Hello,
Sorry to say so but there are a number of issues with this rule and feeder. In fact, you made mistakes against all the important aspects of rules and feeders writing here. We'll tackle these points in what follows.
- First of all, why not creating a consolidation in the measures dimension? 'Full Revenue' is a child with weight = 1, 'INC Standard Cost' is a child with weight = -1. Then you don't need a rule, no feeder. If you want, use a C-type rule to overwrite the value of the consolidation for the currencies where you don't want that calculation. Do not feed that rule if you use it. I guess that almost any of the consolidated results on local currency, whenever you have a consolidated element in your Company dimension, will nee to be overwritten with a rule that applies 0 to these cells.
- If you write a rule like this, include N: right after the = sign. It restricts the calculation to N-level cells in the cube. All consolidated cells will be calculated with the sparse consolidation algorithm if you use Skipcheck and Feeders, provided that your feeders are correct. If not, consolidated cells will show as 0 even though they have descendants that are calculated with the rule and that are non-zero.
- If you feed a rule that is a subtraction, you will have to feed from both parts of the subtraction.
- The qualifier: Currency :'USD' should be on the left-hand side of the feeder rule. That's where the feeder starts.
Sorry to say so but there are a number of issues with this rule and feeder. In fact, you made mistakes against all the important aspects of rules and feeders writing here. We'll tackle these points in what follows.
- First of all, why not creating a consolidation in the measures dimension? 'Full Revenue' is a child with weight = 1, 'INC Standard Cost' is a child with weight = -1. Then you don't need a rule, no feeder. If you want, use a C-type rule to overwrite the value of the consolidation for the currencies where you don't want that calculation. Do not feed that rule if you use it. I guess that almost any of the consolidated results on local currency, whenever you have a consolidated element in your Company dimension, will nee to be overwritten with a rule that applies 0 to these cells.
- If you write a rule like this, include N: right after the = sign. It restricts the calculation to N-level cells in the cube. All consolidated cells will be calculated with the sparse consolidation algorithm if you use Skipcheck and Feeders, provided that your feeders are correct. If not, consolidated cells will show as 0 even though they have descendants that are calculated with the rule and that are non-zero.
- If you feed a rule that is a subtraction, you will have to feed from both parts of the subtraction.
- The qualifier: Currency :'USD' should be on the left-hand side of the feeder rule. That's where the feeder starts.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 128
- Joined: Tue May 23, 2017 12:45 pm
- OLAP Product: Tm1
- Version: 9.5
- Excel Version: 2010
Re: Feeders for Rules
Thanks for your valuable comments, I am learning all these and dint know there was an another way .
Assume my rule is
['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If you feed a rule that is a subtraction, you will have to feed from both parts of the subtraction.
I dint understand here , all i know is if there is a value for full revenue then feed global margin .
How to feed from both parts of subtraction .
Thanks,
Assume my rule is
['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If you feed a rule that is a subtraction, you will have to feed from both parts of the subtraction.
I dint understand here , all i know is if there is a value for full revenue then feed global margin .
How to feed from both parts of subtraction .
Thanks,
-
- MVP
- Posts: 1815
- 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: Feeders for Rules
Wim's suggestion of needing to feed from both parts of the subtraction is a general TM1 concept on the basis that in the example below C would have a value if either A or B had a valueAnalytics123 wrote: ['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If you feed a rule that is a subtraction, you will have to feed from both parts of the subtraction.
I dint understand here , all i know is if there is a value for full revenue then feed global margin .
How to feed from both parts of subtraction .
Thanks,
Code: Select all
['C']=N: ['A'] - ['B'];
Code: Select all
['A']=> ['C'];
['B']=> ['C'];
But a multiplication of revenue equals volume by price could be fed from only volume as volume will be less common than price and a price could exist with no volume and therefore no revenue.
In your specific example from what you have said; I assume you are only applying a standard costing where a sale has occurred and therefore you could feed just from revenue as you would know there will never be a standard cost without a revenue.
However like Wim says; a consolidation is the best option, unless your dimensionsality and other calculations prohibit it.
Declan Rodger
-
- Posts: 128
- Joined: Tue May 23, 2017 12:45 pm
- OLAP Product: Tm1
- Version: 9.5
- Excel Version: 2010
Re: Feeders for Rules
I dint do on both parts of subtraction because
['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If there is no full revenue there will be no cost .
so I have my feeders as
['Full Revenue'] => ['Global Margin'];
I am clear on this now .
But are we not saying this in feeders is overfeeding if we use the above .
Why not use this
['Full Revenue'] => ['Global Margin', Currency:'USD'];
Also I really like the way of using weights to manage this without rules .
I was thinking when you use a negative weight and when values are loaded to that measure i thought it would multiply by negative weight .
But I will try that out .
Also I noticed one think for a rule which involves percentage calculation or division you cannot specify N level calcualtions as we do for subtraction .Because it will sum up all percentage instead of dividing at consolidated level.
Sales Qty ASP
A 100 10 10
B 200 10 20
ASP = Sales /Qty ;
If i do N: level rule then my summary for ASP will be wrong , Assume if A,B is a child of D , then ASP of D will be 30
Thanks for all your help .
['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If there is no full revenue there will be no cost .
so I have my feeders as
['Full Revenue'] => ['Global Margin'];
I am clear on this now .
But are we not saying this in feeders is overfeeding if we use the above .
Why not use this
['Full Revenue'] => ['Global Margin', Currency:'USD'];
Also I really like the way of using weights to manage this without rules .
I was thinking when you use a negative weight and when values are loaded to that measure i thought it would multiply by negative weight .
But I will try that out .
Also I noticed one think for a rule which involves percentage calculation or division you cannot specify N level calcualtions as we do for subtraction .Because it will sum up all percentage instead of dividing at consolidated level.
Sales Qty ASP
A 100 10 10
B 200 10 20
ASP = Sales /Qty ;
If i do N: level rule then my summary for ASP will be wrong , Assume if A,B is a child of D , then ASP of D will be 30
Thanks for all your help .
-
- MVP
- Posts: 3113
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Feeders for Rules
Hello
Can you first have a look at the manuals ? I know that the manual on rules isn't top notch but at least the basics are good.
As to the questions.
Yes, your feeder is correct in that case (without currency USD).
The feeder would be:
[Currency:'USD', 'Full Revenue'] => ['Global Margin'];
The currency is on the left-hand side, like I wrote in my yesterday post.
With respect to the calculations at any level in the cube, the manual says that you would use no identifier.
You leave out the part of N: and the rule applies to both levels.
For the weights: weights define how numbers are added up. Weights do not change the data that is loaded.
Maybe that's where you got the confusion.
Wim
Can you first have a look at the manuals ? I know that the manual on rules isn't top notch but at least the basics are good.
As to the questions.
Yes, your feeder is correct in that case (without currency USD).
The feeder would be:
[Currency:'USD', 'Full Revenue'] => ['Global Margin'];
The currency is on the left-hand side, like I wrote in my yesterday post.
With respect to the calculations at any level in the cube, the manual says that you would use no identifier.
You leave out the part of N: and the rule applies to both levels.
For the weights: weights define how numbers are added up. Weights do not change the data that is loaded.
Maybe that's where you got the confusion.
Wim
Analytics123 wrote: ↑Wed Jul 26, 2017 6:51 pm I dint do on both parts of subtraction because
['Global Margin', Currency:'USD'] =N: ['Full Revenue'] - ['INC Standard Cost'];
If there is no full revenue there will be no cost .
so I have my feeders as
['Full Revenue'] => ['Global Margin'];
I am clear on this now .
But are we not saying this in feeders is overfeeding if we use the above .
Why not use this
['Full Revenue'] => ['Global Margin', Currency:'USD'];
Also I really like the way of using weights to manage this without rules .
I was thinking when you use a negative weight and when values are loaded to that measure i thought it would multiply by negative weight .
But I will try that out .
Also I noticed one think for a rule which involves percentage calculation or division you cannot specify N level calcualtions as we do for subtraction .Because it will sum up all percentage instead of dividing at consolidated level.
Sales Qty ASP
A 100 10 10
B 200 10 20
ASP = Sales /Qty ;
If i do N: level rule then my summary for ASP will be wrong , Assume if A,B is a child of D , then ASP of D will be 30
Thanks for all your help .
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 128
- Joined: Tue May 23, 2017 12:45 pm
- OLAP Product: Tm1
- Version: 9.5
- Excel Version: 2010
Re: Feeders for Rules
Thank you for the quick response . Yes i was confused with the weights .
Yes your post really makes sense . I will read the manual again and come back with any questions .
Yes your post really makes sense . I will read the manual again and come back with any questions .