DimCalcDefUpdate

The DimCalcDefUpdate verb modifies a dimension calculation definition in the model.

The user interface equivalent is the Modify command on the Calculation tab of the Dimension property sheet.

For more information about updating dimension calculation definitions, see DimCalcDefMake.

The syntax is as follows:

DimCalcDefUpdate objDimCalcDef [Dimension objDim] 
[GroupCalculateCategory {True|False}][ Calc expropts][ Set string 
StartList objCats EndList]

Argument

Description

DimCalcDefUpdate objDimCalcDef

Modifies the dimension calculation definition objDimCalcDef. objDimCalcDef can be the object name, object identifier, or both.

Dimension objDim

Is specified, if necessary, to uniquely identify objDimCalcDef. objDim can be the object name, object identifier, or both.

GroupCalculateCategory  {True|False}

Is an option specifying that calculated categories be grouped together in the dimension viewer. The equivalent in the user interface is the Group Calculated Categories Together check box, which displays in the Category Calculation Definition dialog box when you create a category definition. The default is False.

Calc expropts

Specifies the calculation. expropts are mixture of calculation keywords and objects. The calculation keywords that can be used are Average, Max, and Min, as well as the Cognos® Transformer-specific functions Change, Percent-Growth and Share. The objects are specified as object name followed by an at sign (@), the object type, and, optionally, an at sign (@) and the object identifier. The object type can be Category, Level, or Drill. For example, "Go Water Bottle@Category@4805".

Set string StartList objCats EndList

Creates one or more sets and specifies the categories in each set. string is the set name, such as Set 1, Set 2, and so on. objCats can be the object name or the object identifier. This argument is repeated for each set; for example

Set "Set 1" StartList 4795 4797 EndList Set "Set 2" StartList 4799 EndList

Example

This example modifies dimension calculation Share ("Set 1", "GO Sport Line") by adding the category with object identifier 4789 into Set 1.

DimCalcDefUpdate 27195 'share("Set 1", "GO Sport Line")' Dimension 2947 Calc 
share("Set 1@Set", "GO Sport Line@Category@4789") 
Set "Set 1" StartList 4793 4795 4797 4801 4803 EndList