subtracting months
Posted: Mon Mar 31, 2014 1:59 pm
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.
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.