Total Links in Directory:

Leads and Lags with TM1

Date Added: March 05, 2010 07:20:36 PM
Author: John Kay
Category: TM1 Tips and Tricks

The best part of TM1 is its flexibility; however, at times this does mean that you need to add certain logic for common business calculations.  One such common calculation is leads and lags.  Now there are probably several ways to accomplish this within TM1.  In this article, we would look at one approach that I think works well and easy to maintain.

You will an average knowledge of TM1 rules and dimension attributes.  I will cover off the basics initially with no screen shots - perhaps later I can edit this and add screen shots.

Steps:

  1. Create a time dimension with two attributes:  lead and lag.
  2. Populate those attributes with the correct time elements.  For example:

    Element Lead Lag
    January February  
    February March January
    March April February


  3. Now you can reference those references in your TM1 rules.  The following example gets the value from the previous period:

    [balance]=db('cube name',attrs('time_dimension',!time_dimension,'lag'),dim1,dim2);

Now that was not that hard was it?  The corresponding feeder would use the lead atttribute - simply the reverse.

Ratings
You must be logged in to leave a rating.
Average rating: (0 votes)
Comments

No Comments Yet.


You must be logged in to leave a rating.