MDX Functions
This table lists all existing MDX functions and details their support level in Atoti. The following notations are used:| Symbol | Meaning |
|---|---|
| fully supported | |
| partially supported | |
| not supported | |
| will not be supported |
Functions Deviating from MDX Standards
Aggregate Function
The aggregate function in Atoti behaves mostly as described in the MSDN Aggregate (MDX) article. The differences are:Signature with Numeric Expression as Second Argument not Supported
The signature with a numeric expression as second argument is not supported:Aggregate(<Set Expression>)is supportedAggregate(<Set Expression>, <Numeric Expression>)is not supported
Sets with Dimensionality 1
The aggregate function can only operate on sets with dimensionality 1.Double Counting is Discarded
Double counting is discarded. For example, if you have a Geography dimension with the following members:Aggregate({[Geography].[ALL].[AllMember].[France].[Paris], [Geography].[ALL].[AllMember].[France].[Paris]})
, then Paris is only counted once.
Isolated Calculated Member
An aggregate can only be used as an isolated calculated member. It meansCaption Function
This function returns the formatted name of a member. It is also the value of the Intrinsic Member Property MEMBER_CAPTION. See MSDN Intrinsic Member Properties (MDX).Syntax:
InStr Function
This function looks for a string within another. It returns the index (one based) at which the sub-string starts, zero if it is not found. The lookup is case-insensitive. It is possible to specify an offset (one based) at which the search should start. See MSDN InStr Function (VBA).Syntax
- offset (optional): The offset at which the lookup should start in the value. This offset is one based. If the offset is not an integer, an error is returned. If the offset is less or equal to zero, an error is returned.
- value: The string to look into.
- lookup: The string to look up.
Examples
Left Function
This function returns the sub-string of a string starting from the first character up to a specific input length.Syntax
- value: The string to sub-string.
- length: The length of the sub-string. If the length is not an integer, an error is returned. If the length is lower than zero, an error is returned.
Examples
Member Caption Function
The ‘member_caption Function’ is an alias for the ‘Caption Function’. See Caption Function (MDX)Order Function
The MDX Order function in Atoti behaves mostly as described in the MSDN Order (MDX) documentation. This section provides additional details that are not mentioned in the MSDN page.Nested Calls to Order and Hierarchize - Stable Sort
CallingOrder(Hierarchize(set_expression)) deactivates the Hierarchize order.
Calling Hierarchize(Order(set_expression)) deactivates the Order order.
Calling Order(Order(set_expression)) performs a stable sort. This means that members that
are equal according to the first (outer) ordering are sorted according to the second (inner) ordering.
This functionality doesn’t work if any function is inserted between the calls to ‘Order’. For example,
Order(Filter(Order(set_expression))) doesn’t perform a stable sort. Results are sorted only according to the
first (outer) ordering.
Examples
Right Function
It returns the sub-string of a string starting from the last character going backwards to a specific input length.Syntax
- value: The string to sub-string.
- length: The length of the sub-string. If the length is not an integer, an error is returned. If the length is lower than zero, an error is returned.
Examples
VisualTotals Function
The behavior of this function is slightly different from the standard (see MSDN). When you use VisualTotals on a dimension, only the members that appear in the given set and are not measures will be granted (see ISubCubeProperties in Standard Context Values). As a result, members not contained in the VisualTotals are excluded from the results.Syntax
- set: The string to sub-string.
- pattern: Not supported.
Examples
Assuming we have the following data:| Underlyings | contributors.COUNT |
|---|---|
| AllMember | 7 |
| EUR | 4 |
| JPY | 2 |
| USD | 1 |
| Underlyings | contributors.COUNT |
|---|---|
| AllMember | 5 |
| EUR | 4 |
| USD | 1 |
Custom Functions
Atoti also allows the use of several non-standard functions.Is_DataMember
This function returns ‘true’ if the given member is a datamember, ‘false’ otherwise.Syntax
Is_UnknownMember
It returns true if the given member is an unknown member, false otherwise. A member is considered unknown either if it is the UnknownMember of its parent or if it has an UnknownMember in its path. For example, the member[dimension].[hierarchy].[level].[N/A].[A child].[A grand child] is considered unknown because it has
N/A in its path.
Syntax
ActiveMeasure
For details, see Active Measures and MDX compilation.Today
This function returns the date of the current day.Syntax
ReverseHierarchize
ReverseHierarchize reorders a set so that its elements appear in reverse hierarchical order.
The reverse hierarchical order is defined as follows: for each hierarchy in the set, elements are ordered such that
- Parents appear before their children
- Among siblings, the ordering is reversed: items that appear later in the hierarchy come first
Hierarchize.
Example
Given the following set:| Hierarchy 1 | Hierarchy 2 | Hierarchy 3 |
|---|---|---|
| AllMember | AllMember | AllMember |
| AllMember | AllMember/A | AllMember/X |
| AllMember | AllMember/A/A1 | AllMember/X |
| AllMember | AllMember/A/A2 | AllMember/Y |
| AllMember | AllMember/B | AllMember/Y |
| AllMember/J | AllMember/C | AllMember/Y |
| AllMember/K | AllMember/C/C1 | AllMember/Z |
| AllMember/K | AllMember/C/C2 | AllMember/Z |
| Hierarchy 1 | Hierarchy 2 | Hierarchy 3 |
|---|---|---|
| AllMember | AllMember | AllMember |
| AllMember | AllMember/B | AllMember/Y |
| AllMember | AllMember/A | AllMember/X |
| AllMember | AllMember/A/A2 | AllMember/Y |
| AllMember | AllMember/A/A1 | AllMember/X |
| AllMember/K | AllMember/C/C2 | AllMember/Z |
| AllMember/K | AllMember/C/C1 | AllMember/Z |
| AllMember/J | AllMember/C | AllMember/Y |
| Hierarchy 1 | Hierarchy 2 | Hierarchy 3 |
|---|---|---|
| AllMember | AllMember | AllMember |
| AllMember | AllMember/B | AllMember/Y |
| AllMember | AllMember/A | AllMember/X |
| AllMember | AllMember/A/A1 | AllMember/X |
| AllMember | AllMember/A/A2 | AllMember/Y |
| AllMember/J | AllMember/C | AllMember/Y |
| AllMember/K | AllMember/C/C1 | AllMember/Z |
| AllMember/K | AllMember/C/C2 | AllMember/Z |