Page 1 of 1

Natural Consolidation to calculate %

Posted: Fri May 10, 2013 4:22 am
by conray
Is it possible to use natural consolidation to calculate %, such as:
A amount / B amount = AB%

AB%
|_ A amount
|_ B amount

Re: Natural Consolidation to calculate %

Posted: Fri May 10, 2013 4:39 am
by Alan Kirk
conray wrote:Is it possible to use natural consolidation to calculate %, such as:
A amount / B amount = AB%

AB%
|_ A amount
|_ B amount
Not in a consolidation; for that you use Rules.

Exception: If the percentage is a fixed amount (say 10%) rather than being stored in another element, you can use a weighting when you add A Amount to the consolidation AB%. If the amount is variable, though, Rules are required.

Re: Natural Consolidation to calculate %

Posted: Fri May 10, 2013 4:41 am
by Christopher Kernahan
Hi conray,

You'll have to use Rule Calculations for that.

Re: Natural Consolidation to calculate %

Posted: Fri May 10, 2013 10:04 am
by conray
ok understood, thanks for the feedback.

Re: Natural Consolidation to calculate %

Posted: Tue May 21, 2013 10:16 am
by Wim Gielis
Alan Kirk wrote:Exception: If the percentage is a fixed amount (say 10%) rather than being stored in another element, you can use a weighting when you add A Amount to the consolidation AB%. If the amount is variable, though, Rules are required.
This trick can be used to have numeric values expressed in thousands (or millions):
make a consolidation out of the original value, with weight 0.001 (or 0,000001).
Apply numberformatting and you're done. It saves us from writing a lot of feeders and
therefore, the TM1 model is potentially a lot smaller and efficient.

Re: Natural Consolidation to calculate %

Posted: Tue May 21, 2013 1:28 pm
by lotsaram
Wim Gielis wrote:This trick can be used to have numeric values expressed in thousands (or millions):
make a consolidation out of the original value, with weight 0.001 (or 0,000001).
Apply numberformatting and you're done. It saves us from writing a lot of feeders and
therefore, the TM1 model is potentially a lot smaller and efficient.
If you have a separate "scale" dimension in the model using exactly this technique that you add to all cubes as required then this is an even better trick. ;)

Re: Natural Consolidation to calculate %

Posted: Wed May 22, 2013 5:04 am
by conray
i am lost :?

Re: Natural Consolidation to calculate %

Posted: Wed May 22, 2013 7:37 am
by Alan Kirk
conray wrote:i am lost :?
You're on Earth, third planet of a yellow star commonly referred to as The Sun which is located in one of the more unfashionable backwaters of the Alpha quadrant of the Milky Way galaxy.

Or if that doesn't answer your question...

Are you referring to weightings in consolidations?

If so, what we're talking about is this. Suppose that you have 5 N level elements in a consolidation, named A to E. By default these have a weighting of 1, meaning that the consolidation's value will be A + B + C + D + E, agreed?

However the weighting doesn't have to be 1; it can be any value. So suppose that you set the weighting for each of them to 0.001. The consolidation's value will then be (0.001 * A) + (0.001 * B) + (0.001 * C) + (0.001 * D) + (0.001 * E).

So supposing that A, B, C, D and E were in millions, your consolidation is now reporting the value rounded to thousands, without having to write a rule to do it or relying on rules functions which are less efficient than consolidations.

Re: Natural Consolidation to calculate %

Posted: Wed May 22, 2013 8:37 am
by Duncan P
Looking at OP's original question I would be lost too if I were OP. He (?) asked about division and we got a (nonetheless interesting) discussion of scaling.

Basically natural consolidation adds. OP wants to divide. The only way for OP to do this with natural consolidations is to add the logarithms of the numbers (with a weight of -1 on the second) and then antilog. This would require a rule to do the log and antilog and is also much complicated by edge conditions (log(0) is -infinity) so why not just divide anyway.

BTW I like the way lotsaram said
lotsaram wrote:that you add to all cubes as required
You must have been thinking of another piece of software - or are you a closet Performance Modeler user :o ?

Re: Natural Consolidation to calculate %

Posted: Wed May 22, 2013 8:58 am
by Alan Kirk
Duncan P wrote:Looking at OP's original question I would be lost too if I were OP. He (?) asked about division and we got a (nonetheless interesting) discussion of scaling.

Basically natural consolidation adds. OP wants to divide.
What does a weighting of 0.001 do?

Or, since we're talking percentages (or were in the original post), what does a weighting of 0.01 do?

Hence my original "Exception" qualification
I wrote:Exception: If the percentage is a fixed amount (say 10%) rather than being stored in another element, you can use a weighting

Re: Natural Consolidation to calculate %

Posted: Tue Jun 04, 2013 7:33 am
by conray
okay, so this is what i understood:
1. Alan is trying to explain, that we can round values using weightings instead of applying rounding method directly in rules.
2. There is no direct way to use natural consolidation to do a division.