Exploring TM1 - a Chartertech Company
Search
Close this search box.

CellIncrementN TM1 Function: Use and Syntax

CellIncrementN is used to incrementally add a value into a cell in TM1. It inserts a number into a specific intersection of a cube, adding onto any value that is already there. It does not overwrite that value, rather it increases it incremetnally.

Syntax of CellIncrementN

The syntax is

CellIncrementN (Number, Cube, element1, element2, elementn ); 

where

  • Number is the string you want to insert into a cube
  • cube is the cube you insert the string into
  • element1 is an element from the first dimension of the target cube
  • element2 is an element from the second dimension of the target cube
  • elementn are the elements from subsequent dimensions in order of the target cube

Usage of CellIncrementN

Let’s assume there is the following source data:

‘2014’, ‘Jan’, ‘Sales’, 50000

‘2014’, ‘Jan’, ‘Sales’, 25000

If we used CellPutN with this data we would end up with $25,000 in the intersection of 2014, Jan and Sales because the last value to be loaded into that intersection is $25,000. Using the incremental version we would get $75,000 as the value at the intersection will be incrementally increased each time the intersection is found in the source data.

Warning!

If you have not cleared out a cube before you load it, then using this function will keep on adding onto what is already there. If you need to clear out part of a cube, please see this post on zeroing out data.

Example

An example is CellIncrementN (50000, Sales, ‘2014’, ‘Jan’, ‘Salary’); which will insert the value 50,000 into the Sales cube at the intersection of 2014 in the Year dimension, ‘Jan’ in the Month dimension and ‘Sales’ in the Measures-Sales dimension.

Importantly, if there is already a value, say 25,000 in this intersection, the CellIncrementN will add 50,000 onto this, making the new value at this intersection 75,000.

CellIncrementN can be used in TM1 Turbo Integrator Processes only

If you need to have the value loaded and OVERWRITE an existing intersection, please see CellPutN.

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Log In