Absolute Measure

Post Reply
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Absolute Measure

Post by TM1ethusiast »

I have two measure in my measures dimension for Currency.Now there is requirement that i need to add third measure which should be absolute measure (always display positive value).Had it been Cognos i would have drag a data item and write abs(measure value) and there you go! Is any easy way to do it TM1.appreciate your help.Thanks
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Absolute Measure

Post by mvaspal »

Hi,
Just add abs(MeasureValue) to your rule and there you go!
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Absolute Measure

Post by David Usherwood »

Not forgetting your feeder(s) :)
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Thanks for your help.Currently i don't have any rules defined on the cube.Any other way around or i have to have write a rule?
User avatar
George Regateiro
MVP
Posts: 326
Joined: Fri May 16, 2008 3:35 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP3
Location: Tampa FL USA

Re: Absolute Measure

Post by George Regateiro »

TM1ethusiast wrote:Thanks for your help.Currently i don't have any rules defined on the cube.Any other way around or i have to have write a rule?
That depends on how this data is used or updated. You could write a process that populates that measure with the same abs logic. But this would not be realtime. If your entry is only through templates where you could assign an action button this is pretty easy to do, but if you are entering through multiple touch points then you will have an issue with this method.

The rule is the safer method and should not impact performance (assuming properly structured static and working versions that are fed properly).
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Hi all,I have written a rule below it is say va_measures element doesn't exist ,where as va_measures is dimension name

Skipcheck;

['Absolute FR value']=N:['va_measures',abs('FR value')];

Feeders;
[abs('FR value')]=>['Absolute FR value'];

could you please tell me the correct syntax.Thanks
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Absolute Measure

Post by Duncan P »

The function goes round the cell reference - not the other way round

Code: Select all

['Absolute FR value']=N: abs( ['FR value'] );
and you probably don't need the dimension name - and if you did it would be

Code: Select all

['va_measures':'Absolute FR value']=N: abs( ['va_measures':'FR value'] );
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Thanks Duncan.Appreciate it a lot.
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Hi All, I have added below rule to the cube and it is showing no errors,but the data is incorrect for absolute FR value ,as when i check through one element the value for FR value is -19,374 where as absolute value is 347,27,796.Where my intention is to show -19,374 as 19,374 where iam going wrong ,Please help.

Skipcheck;
['Absolute FR value']=N:abs(['FR value']);

Feeders;
['FR value']=>['Absolute FR value'];
declanr
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: Absolute Measure

Post by declanr »

TM1ethusiast wrote:Hi All, I have added below rule to the cube and it is showing no errors,but the data is incorrect for absolute FR value ,as when i check through one element the value for FR value is -19,374 where as absolute value is 347,27,796.Where my intention is to show -19,374 as 19,374 where iam going wrong ,Please help.

Skipcheck;
['Absolute FR value']=N:abs(['FR value']);

Feeders;
['FR value']=>['Absolute FR value'];

Are you by any chance viewing it at a consolidated level?

FR Value: 10,000 + (7,000) + (6,000) = (3,000)
Absolute Value: 10,000 + 7,000 + 6,000 = 23,000

If that is the case, you need to consider whether you want/need the "=N:" or not.
Declan Rodger
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Thanks Declanr,I am looking at leaf level,for example for the leaf element A the FR value is -6,742 but the Absolute FR value is 35,181,Strangely enough this is happening with negative values only where as positive values are somewhat closer.
declanr
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: Absolute Measure

Post by declanr »

TM1ethusiast wrote:Thanks Declanr,I am looking at leaf level,for example for the leaf element A the FR value is -6,742 but the Absolute FR value is 35,181,Strangely enough this is happening with negative values only where as positive values are somewhat closer.
You are positive:
A/ That EVERY dimension is at the leaf level?
B/ The only rules in your cube are what you have posted above in this topic?

If both of the above statements are true, can you post a screenshot of what you are seeing.
Declan Rodger
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Thanks Declanr,You are spot on the dimensions had all levels selected,what i did is created a sample test cube with two leaf level elements and wrote the same rule and the did worked right,so ,i guess it has to do with the levels of data.I will do further testing tomorrow.Appreciate your help.
TM1ethusiast
Posts: 27
Joined: Wed Mar 06, 2013 2:48 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007

Re: Absolute Measure

Post by TM1ethusiast »

Hi Declanr, Could you please tell me if i need to show the Absolute value at Consolidation level,I just need to remove the :N and add :C or just removing :N will do.Appreciate your help.Thanks
declanr
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: Absolute Measure

Post by declanr »

TM1ethusiast wrote:Hi Declanr, Could you please tell me if i need to show the Absolute value at Consolidation level,I just need to remove the :N and add :C or just removing :N will do.Appreciate your help.Thanks
"=" Applies to both N-Level and C-level cells
"=N:" Applies to only N-Level cells, C-Level cells will consolidate as standard unless otherwise defined
"=C:" Applies only to C-Level cells, N-Level cells will be "open for entry" unless otherwise defined
"=S:" Applies to string cells (not relevant here)

TM1ethusiast,

I am not really sure what you are trying to do as your end result but in your question above you have stated your options, the best course of action would be to try each one out and then see if the results are what you would like to see. If it looks as you want it to then you have the right option. Even if it is the last one you check; all in all it should take less than 10 minutes.

I personally can't think of many examples where you would need the C-Level absolute value to be anything other than the naturally consolidated total of it's N-level constituents. However if for some reason you do need it to do that in its own right then just remove the qualifier and stick with "=".

The above can be found in the rules guide under the "Components of a Rule" section. The rules guide isn't always perfect but it usually explains basic introductory concepts well enough if you mix in a little bit of trial and error testing. Failing that it would be good to try and get on an instructor-led training course if you find it easier to learn through tuition. IBM obviously have their own offerings; as do a number of business partners.

HTH
Declan Rodger
Post Reply