subtracting months

Post Reply
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

subtracting months

Post by Kazêh »

Hi all, i have a measure dimension and a months dimension, and others too , but for my example I will mention only those two.

what i want to do is to subtract the value of the month to the previous month

example:

Jan = Feb-Jan
Feb= Mar- Feb
Mar= Abr- Mar

etc...

what i tho i could do was this
create an atribute named previous month as string and add the months and make the diference.

Something like this:


['Measure A'] = N: DB('Cube1',!Dim1,!Dim2, !Dim3,!Months) - DB('Cube1',!Dim1,!Dim2, !Dim3,attrs('Months',!Months,'previous month');
i tryed that but i got 0's , I think I need an accountant or something to make it move between months, but I wonder if the logic is well underway

Just so you know my months measure is like: Jan,Feb,Mar,Apr,May....etc.

any tips will be appreciated

Thanks.

Kazeh.
User avatar
qml
MVP
Posts: 1096
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: subtracting months

Post by qml »

If someone attempted to solve your equations they would receive the following results:
Jan = Feb-Jan -> Feb = 0
Feb = Mar-Feb -> Mar = 0

Not to mention that your example is in direct contradiction to your description: "what i want to do is to subtract the value of the month to the previous month".

But that aside, this is not the sort of calculation you want to be doing using rules (for a number of reasons that have been mentioned to death on this forum). You should consider creating consolidations in the month dim:

Feb Mvt
+Feb
-Jan

Mar Mvt
+Mar
-Feb

etc.
Kamil Arendt
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: subtracting months

Post by Kazêh »

xD, sorry y english is not very good, but i get the idea, im looking to the other post if i find a way to do this.
thanks
User avatar
qml
MVP
Posts: 1096
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: subtracting months

Post by qml »

Kazêh wrote:xD, sorry y english is not very good, but i get the idea, im looking to the other post if i find a way to do this.
thanks
You are most welcome. Not quite sure though what other information you want to find elsewhere. Surely creating some consolidations with weightings is relatively easy?
Kamil Arendt
Post Reply