SetAllocation Method
Syntax
object .SetAllocation Measure, AllocationType [, AllocationMeasure ]
Applies To
Discussion
Allocation is possible only when your model uses multiple data sources. Use this method to specify how or if Transformer allocates summary data to a dimension, level, or category.
When you change the allocation type for a level, the new allocation type is applied from the categories in that level to all descendant categories.
When the source of a measure is a data source that does not reference a dimension in the model, Transformer automatically allocates the measure to the entire dimension and then allocates the measure value as a constant throughout the dimension. To roll back this allocation, use the SetAllocation method with the trAllocationNA constant.
The CanAllocate property must return a value of True for allocation to proceed.
A COM exception is thrown in error situations. The message that is passed with the exception varies depending on the error situation.
Parameter |
Description |
---|---|
Measure |
Required. Specifies the measure to apply allocation to. Type: Object-Measure |
AllocationType |
Required. Sets the allocation option. Specifies a constant of the value list xtrAllocationType. Specifies the object to use as the source of allocation values. Type: Constant-xtrAllocationType |
AllocationMeasure |
Optional. Applies only when the AllocationType parameter is set to trAllocationAllocated. Type: Object |
Return Type
None
Examples
objDimension.SetAllocation(objMeasure, xtrAllocationType.trAllocationNA)