DIMNM/DIMIX To Compute Yearly Change?

Post Reply
AJB77
Posts: 3
Joined: Mon May 18, 2015 6:24 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 1997

DIMNM/DIMIX To Compute Yearly Change?

Post by AJB77 »

Hello,

Any guidance on the following would be much appreciated. I have the following data:

Year 1 $100
Year 2 $300
Year 3 $600
Year 4 $1,000

Attempting to write a single rule that calculates the change in $ for each year. I can successfully write a rule specific to only Year 2, or only Year 3, etc, but am hoping to consolidate in to a single rule. From my searching on this site, I am curious if the DIMNM/DIMIX functions may be the ticket?

In quantitative terms, looking to calculate the Year 2 delta of $200, Year 3 delta of $300, etc.

Perhaps even more enriching is how to make the rule address Year 1, where there is no data to calculate the yearly change.

Thank you in advance for your assistance.

Regards,
A
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: DIMNM/DIMIX To Compute Yearly Change?

Post by tomok »

Create an attribute on your Time dimension called "PriorYear" and populate with the element value that represents the prior year. Then your rule would be:

['Delta'] = N:DB('CubeName', !Dim1, !Dim2, !Dim3.....!TimeDim, !MeasureDim) - DB('CubeName', !Dim1, !Dim2, !Dim3.....ATTRS('TimeDim', !TimeDim, 'PriorYear'), !MeasureDim);
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
AJB77
Posts: 3
Joined: Mon May 18, 2015 6:24 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 1997

Re: DIMNM/DIMIX To Compute Yearly Change?

Post by AJB77 »

Thank you Tomok. In the syntax below, how is the element for the calculation identified, as it appears there is only !MeasureDim in the string? Should I also reference an N level element from the MeasureDim?

Thank you again for your assistance, much appreciated.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: DIMNM/DIMIX To Compute Yearly Change?

Post by Alan Kirk »

Assuming that you haven't grossly oversimplified the question, the answer is that you don't use a rule at all in a case like this; you use consolidations made up of each year and the preceding year, with the preceding year weighted as -1. Consolidations are faster than rules, and it's an extremely rare instance when you should use a rule as a substitute for a consolidation.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: DIMNM/DIMIX To Compute Yearly Change?

Post by Alan Kirk »

AJB77 wrote:Thank you Tomok. In the syntax below, how is the element for the calculation identified, as it appears there is only !MeasureDim in the string? Should I also reference an N level element from the MeasureDim?
The answer that I gave in the preceding post still stands, but if you insist on doing it by rules it's worth reading the rules guide first. I would point to the location of the relevant section on the Web but every IBM documentation link in the FAQ, in my signature or from a Google search is currently coming up as "Our apologies… The page you requested cannot be displayed". Whether this is a temporary glitch or whether the've recently restructured their site isn't clear but either way, love your work with your web sites IBM, always have.

Therefore referring to the hard copy of the rules guide that should have come with your installation, page 40 of the 10.2.2 one states:
A PDF That Even IBM Can't Break wrote:The function has three arguments: the name of the cube from which values are retrieved and two element references. Each element reference is preceded with an exclamation point, often called a "bang."

To understand the "bang", keep in mind that the rule is executed only when a value is requested. The expression "!market" tells the rules interpreter to use the element of the Market dimension in the MarketExchange cube that matches the Market element for the requested value in the Purchase cube.
I suggest reading through that whole section of the manual to see the example, which should sufficiently explain what "!MeasureDim" means in Tomok's example.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
AJB77
Posts: 3
Joined: Mon May 18, 2015 6:24 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 1997

Re: DIMNM/DIMIX To Compute Yearly Change?

Post by AJB77 »

Thank you for the assistance, and my apologies for the delay in responding.
Post Reply