HierarchySubsetMDXSet
HierarchySubsetMDXSet applies a specified MDX expression to an existing public subset of a hierarchy.
If the passed MDX expression is valid, the specified subset is saved as a dynamic subset defined by the MDX expression.
If the passed MDX expression is an empty string, the subset is converted to a static subset that contains the elements that are in place when HierarchySubsetMDXSet is executed.
The function returns the number of elements that the subset contains.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
HierarchySubsetMDXSet(DimName, HierName, SubName, MDX_expression);
Argument | Description |
---|---|
DimName | The parent dimension of the subset. |
HierName | The name of the hierarchy within the dimension. |
SubName | The subset to which you want to apply the MDX expression. SubName must be a public subset. If this subset does not exist, an error is logged. |
MDX_expression | The MDX expression that you want to apply to the subset. If the MDX expression
is invalid, TurboIntegrator processing stops, the subset is not modified, and an error is logged.
If the MDX_expression argument is an empty string, the subset is converted to a static subset. |
Example
HierarchySubsetMDXSet('Cities', 'World', 'Sub1', '{ [Cities].[Cities].[level000].members }');
This example updates the Sub1
subset of the World
hierarchy to
a dynamic subset that contains the current leaf elements of the Cities
dimension.
When leaf elements are added or removed from the Cities
dimension, the
mySub1
subset is dynamically updated to reflect the changes in the parent
dimension.