Show TOC

Syntax documentation*MEMBERSET Locate this document in the navigation structure

Allowed uses: By Commit, MDX, SQL

*MEMBERSET({variable}, {member set in MDX format})

Allows you to retrieve a list of elements from a dimension and save it in a user-defined variable for later use anywhere else in the logic.

Example Example

*MEMBERSET((%REPORTING_CURRENCIES%, “filter{[CURRENCY].members,

[currency].properties(“GROUP”)=”REP””)

End of the example.

You can fill the variable %REPORTING_CURRENCIES% with the list of reporting currencies defined in the current application. The content of the resulting variable can then be used anywhere in the logic, as in this example:

Example Example

*XDIM_MEMBER_SET CURRENCY=%REPORTING_CURRENCIES%

End of the example.

Important remarks:

  1. The MEMBERSET statement generates an MDX query, and can be preferred to the SELECT statement to perform complex hierarchical selections or whenever an MDX query is more appropriate than a SQL one. If you want to select a list of elements from a dimension using a SQL query, use the *SELECT statement.

  2. In case any parameter contains embedded commas the entire parameter must be enclosed in an extra set of double quotes.

  3. The *MEMBERSET statement is executed at the time the logic is validated, and the expanded result is written in the LGX file. This means that if the related dimension is modified, it may be necessary to revalidate the logic.

  4. Statements returning no members do not necessarily cause the validation of the logic to fail. In this case, a warning is entered in the validation log.

  5. These instructions are not specific to a given logic section, but they can be written once anywhere in the logic and used across multiple commit sections.