Uda

The MDX Uda function selects all Essbase members to which a specified user-defined attribute is associated, either in the entire dimension, or in a subtree rooted at the input member.

Syntax

Uda ( dimension | member, string_value_expression )

Parameters

dimension

The dimension in which matching UDAs are searched.

member

A member to search (descendants included) for matching UDAs.

string_value_expression

The name of the UDA to be selected. Can be an expression that evaluates to the UDA string, or an exact character string (not case-sensitive) enclosed in double quotation marks.

Notes

A user-defined attribute is a term associated with members of an outline to describe a characteristic. This function selects all members that have the specified UDA.

Example

Dimension Example

In the following query, the Uda function searches a dimension (top member included) for descendant members having a UDA of Major Market:

SELECT
  {[Measures].[Sales], [Measures].[Profit]} ON COLUMNS,
  {UDA([Market], "Major Market")} ON ROWS
FROM Sample.Basic
WHERE ([Year].[Jul], [Product].[Cola])

Table 4-136 Output Grid from MDX Example

(axis) Sales Profit
East 2248 1156
New York 912 370
Massachusetts 665 564
Florida 286 104
California 912 370
Texas 567 206
Central 1392 369
Illinois 567 208
Ohio 85 18
Colorado 199 70

returning the grid:

Member Example

In the following query, the Uda function searches a member (itself included) for descendant members having a UDA of Major Market:

SELECT
  {[Measures].[Sales], [Measures].[Profit]} ON COLUMNS,
  {UDA([East], "Major Market")} ON ROWS
FROM Sample.Basic
WHERE ([Year].[Jul], [Product].[Cola])

returning the grid:

Table 4-137 Output Grid from MDX Example

(axis) Sales Profit
East 2248 1156
New York 912 370
Massachusetts 665 564
Florida 286 104