StrToMember

Returns a member constructed from a string on the given hierarchy or attribute. Use this function to get members in the system.

  • Returned Output: Member
  • Library: PQL \ Semantic \ String
  • Version: 2018.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

StrToMember( <Hierarchy> , <Text> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The hierarchy or attribute needs to the unique name for an existing hierarchy in the model.
  • The text string needs to be the name or 'caption' of the item. The string can be derived using any string operations or methods in the rest of the calculation engine.
  • For details on how to employ and use this function see the semantic calculation overview.

Examples

This example returns the member "Australia" from the country hierarchy of the customer dimension (table):

StrToMember( [customer].[country], "Australia" )

The following example returns the member "John" from the user hierarchy of the Security dimension (table) based on the fact that a user called "John" has logged into Pyramid:

StrToMember( [security].[user], UserName() )