UNDEFVALS

Putting UNDEFVALS in the rules for a cube changes the default value for the cube from zero to an special undefined value.

This is a TM1® rules function, valid in both TM1 rules and TM1 TurboIntegrator processes.

This has ramifications for how data is stored in the cube and retrieved.

  • Data Storage

    For a cube without UNDEFVALS in the rules, the default value is zero. If an attempt is made to store a zero in a cell of the cube, that storage request is ignored, since one is trying to store the default value, and it would needlessly consume memory space.

    If however the cube has UNDEFVALS defined in the rules, this makes the default value a special undefined value. Now when a zero is stored in a cell of a cube, it is actually stored, just like any other non-zero value.

  • Data Retrieval

    For a cube without UNDEFVALS in the rules, the default value is zero. When a cell is retrieved, and there is no value currently stored for that value in the cube, a value of zero (as the default value) is returned.

    If however the cube has UNDEFVALS defined in the rules, this make the default value a special undefined value. Now when a non-existent cell is retrieved, the value retrieved will be this special undefined value. This can be used to distinguish a cell which does not exist (undefined value) from a cell which exists but whose value is zero (zero returned).

    Note: It is not currently possible in Turbo Integrator to test for this special undefined value directly. This special undefined value is not the value returned by the UNDEF() Turbo Integrator function. The value returned by UNDEF() is an undefined value used for such things as an attempt to divide by zero, or take the logarithm of an illegal number, etc.

You can indirectly test for this special undefined value as follows:

vv = CellGetN( 'cube-name', elements-list);if ( vv >
0 );
   # 'special undefined' value is greater than zero
   # convert the value to a string
   vv_str = str(vv,20,16);
   # convert the string back to a number
   converted_vv = NUMBR( vv_str );
   if ( converted_vv = 0 );
      #converted number is now zero, but original was non-zero
      #this is the 'special undefined' value
   Else
      #normal non-zero cell value
   Endif;
Endif;

Syntax

UNDEFVALS

Arguments

None.