StrToMbr
The MDX StrToMbr() function for Essbase converts a string to a member name.
Syntax
StrToMbr ( string [, dimension ] [, MEMBER_NAMEONLY | alias_table_name ] )
Parameters
- string
-
Input string.
- dimension
-
Optional dimension specification. If used, only member names found in this dimension will be returned.
- MEMBER_NAMEONLY
-
Optional. Create member name only out of member names found (not including aliases). The default is to search for member names and all aliases.
- alias_table_name
-
Optional. Create member name only out of alias name strings found. The default is to search for member names and all aliases.
Notes
You can also use member properties as input to StrToMbr. These properties include MEMBER_NAME, MEMBER_UNIQUE_NAME, MEMBER_ALIAS, ANCESTOR_NAMES, and COMMENTS. For example:
SELECT {StrToMbr(Sales.MEMBER_NAME)} ON COLUMNS
FROM Sample.Basic
Examples
The following MDX query returns CA
:
SELECT
{ StrToMbr("CA" , [Geography], "Default") }
ON COLUMNS,
Children([High End Merchandise])
ON ROWS
FROM Asosamp.Basic
The following MDX query returns nothing, because "Quarter1"
is an alias.:
SELECT
{ StrToMbr("Quarter1" , [Year], MEMBER_NAMEONLY) }
DIMENSION PROPERTIES [YEAR].[MEMBER_ALIAS]
ON COLUMNS,
Children([100])
ON ROWS
FROM Sample.Basic
The following MDX query returns Qtr1
:
SELECT
{ StrToMbr("Qtr1" , [Year], MEMBER_NAMEONLY) }
DIMENSION PROPERTIES [YEAR].[MEMBER_ALIAS]
ON COLUMNS,
Children([100])
ON ROWS
FROM Sample.Basic
The following MDX query returns Qtr1
because "Quarter1"
is in the "Long Names"
alias table:
SELECT
{ StrToMbr("Quarter1" , [Year], "Long Names") }
DIMENSION PROPERTIES [YEAR].[MEMBER_ALIAS]
ON COLUMNS,
Children([100])
ON ROWS
FROM Sample.Basic