TM1 supports the following TM1-specific MDX expressions. You can apply these expressions while developing MDX applications to run against the TM1 server or when creating/editing dynamic subsets in the Expression Window of the Subset Editor.
- TM1FILTERBYPATTERN(set, pattern_str)
- TM1FILTERBYLEVEL(set, level_number)
- TM1DRILLDOWNMEMBER(set1, set2 {|ALL [,RECURSIVE]} )
- TM1Member
- TM1SORT(set, ASC|DESC )
- TM1SORTBYINDEX(set, ASC|DESC )
- TM1SUBSETALL(dimname)
- TM1SubsetToSet
- TM1TupleSize
TM1FILTERBYPATTERN(set, pattern_str):
This TM1-specific MDX function returns all the members in set with names matching the pattern pattern_str.
The syntax of pattern_str is the same used for the Select By Regular Expression option on the Subset Editor.
TM1FILTERBYLEVEL(set, level_number):
This TM1-specific MDX function returns all the members in
level_number is a number specifying a TM1 level number not an MDX level number.
TM1DRILLDOWNMEMBER(set1, set2 {|ALL [,RECURSIVE]}):
This TM1-specific MDX function is similar to the DRILLDOWNMEMBER function from Microsoft , but it has been adjusted to match the functionality of the Expand button {bmct expand_button.bmp} on the Subset Editor.
ALL means drilldown all the members in set1.
RECURSIVE means that when one member from set1 is being drilled down upon, every consolidated member resulting from that expansion will also be recursively drilled down until level 0 ( TM1 level 0 ) is reached.
TM1Member:
This function returns a member from a specified tuple. A null member reference is returned when any of the following conditions are encountered:
- A null Tuple parameter
- An out-of-range numeric Index parameter
- A dimension or hierarchy parameter not found in the passed tuple.
Syntax:
TM1Member(Tuple, MemberSpecifier);
Arguments:
| Argument | Description |
| Tuple | An expression that resolves to a tuple. |
| MemberSpecifier | This parameter can be either a 0-based numeric index into the tuple or the name of a dimension/hierarchy associated with the tuple. See below for examples showing both parameter types. |
Example:
TM1Member ( [model].Members.Item(23) ,0 ) ] This example uses a numeric index into the tuple as the MemberSpecifier argument.
TM1Member( [model].Members.Item(23), [Model] ) ] This example uses the name of a dimension associated with the tuple as the MemberSpecifier argument.
TM1SORT(set, ASC|DESC):
This TM1-specific MDX function sorts set alphabetically.
ASC sorts A-Z
DESC sorts Z-A
TM1SORTBYINDEX(set, ASC|DESC):
This TM1-specific MDX function sorts set by the index value of the members.
ASC sorts by ascending index value.
DESC sorts by descending index value.
TM1SUBSETALL(dimname):
This TM1-specific MDX function returns the TM1 subset All of dimname.
TM1SubsetToSet:
This function returns the members of a TM1 subset.
TM1SubsetToSet is equivalent to the dimension.subsetname expression, but does not require string literals. Instead, TM1SubsetToSet lets you use expressions that resolve to the appropriate dimension and subset.
Syntax: TM1SubsetToSet(Dimension_exp, Subet_exp);
Arguments:
| Argument | Description |
| Dimension_exp | An expression that resolves to a valid TM1 dimension name. |
| Subset_exp | An expression that resolves to a valid subset of the dimension returned by Dimension_exp. |
When resolving an expression for a subset, the TM1 server searches first in the private subset list and then in the public list.
TM1TupleSize:
This function returns the number of members in a tuple.
Syntax: TM1TupleSize(Tuple);
Arguments:
| Argument | Description |
| Tuple | An expression that resolves to a tuple. The function returns 0 if the Tuple argument does not resolve to a valid tuple, or of the tuple is null or empty. |
TM1 supports the following TM1-specific MDX expressions. You can apply these expressions while developing MDX applications to run against the TM1 server or when creating/editing dynamic subsets in the Expression Window of the Subset Editor.
- dimension.subsetname
- member.ANCESTORS
dimension.subsetname
This TM1-specific MDX expression returns members of subsetname in dimension.
Since the same syntax (dimension.IDENTIFIER)is used for members and levels, a subset with the same name of a member or a level will never be instantiated.
When searching for a subset, the TM1 server searches first in the private subset list and then in the public list.
member.ANCESTORS: This TM1-specific MDX expression returns the ancestors of member.
For example, assuming the following hierarchy of the Month dimension:
-
Year
- 1 Quarter
- Jan
- Feb
- Mar
the expression
month.jan.ANCESTORS
returns the set
{ 1Quarter, Year }.
If the member has more than one immediate parent, the expression returns the set containing the first parent in the default hierarchy. Consider a hierarchy of a Region dimension, where the member Belgium has more than one immediate parent, being Benelux and Europe. In this case, the expression
region.belgium.ANCESTORS
returns the set
{ Benelux, Europe }.
Read this aritcle completely...

