DB TM1 Function: Use and Syntax

The DB function returns the contents from a specific intersection in a TM1 cube (either string or numeric). It allows you to interrogate one TM1 cube from another and return a value from a specific intersection from the source cube.

For example, you might have an assumption cube with a standard Wage Increase of 5% and you want to apply that to all of your employees.  Using a DB within the rules of your Labour cube will allow you to pull that standard wage increase into the Labour cube for all employees. In this way it is entered once in the assumption cube and used everywhere.

Syntax of DB

The syntax is DB (cube, element1, element2, element3, elementn); where

  • cube is the cube you want to look up the value from
  • element1 is an element from the first dimension of the source cube
  • element2 is an element from the second dimension of the source cube
  • element3 is an element from the third dimension of the source cube
  • elementn are the elements from subsequent dimensions in order from the source cube


An example is DB (‘Opex’, !Year, !Month, ‘Actual’, !Opex Account, !Cost Centre, !Measures Opex ); which will return the value from the Opex cube that corresponds to the currently addressed values in the Year, Month, Opex Account, Cost Centre and Measures Opex for the ‘Actual’ element from the scenario dimension.

Note that DB can be used in TM1 Rules only. If you are looking for similar functionality for TM1 Turbo Integrator processes, please see CellGetS and CellGetN.

If you like this post, please spread the love…

About John

Managing Director of Infocube. We are a management accounting consultancy that specialises in Business Analytics.

9 comments on “DB TM1 Function: Use and Syntax

  1. BariAbdul says:

    First of all thanks for the wonderful information,quite useful and pertinent indeed!
    Just want to clarify one thing DB is mentioned in reference guide as exclusively meant for rules but I have surely seen it is used in TI to reference particular interaction.

    1. Frank says:

      No, from what I know, it is Rules only. DB specifically allows us to interrogate a specific intersection of another cube, so is used for linking cubes to pass data from one to another. This would not be relevant for a TI process. If you want to use a Turbo Integrator process, then you would need to use a TM1 cube source.

  2. BariAbdul says:

    Thanks for the reply,Frank.I am sure I have seen it in TM1 forum somebody using it while referencing AsciiOutput.

  3. BariAbdul says:

    There is an interesting discussion about the same,Apparently from version 10 it is no longer possible:
    http://www.tm1forum.com/viewtopic.php?f=3&t=11560 Thanks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.