Uda

Selects all members to which a specified user-defined attribute is associated in the entire dimension or in a subtree rooted at the input member.

Syntax

Uda ( dimension | member, string_value_expression )
ParameterDescription

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])
(axis)SalesProfit
East22481156
New York912370
Massachusetts665564
Florida286104
California912370
Texas567206
Central1392369
Illinois567208
Ohio8518
Colorado19970

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:

(axis)SalesProfit
East22481156
New York912370
Massachusetts665564
Florida286104