Example Expressions for Filtering Levels

Expression filters that reference member values and attribute relationships were used to filter levels in the following examples. The levels referenced in the filters need to be visible in the view in order for the filters to impact the view.

Note: These same types of expressions can be used when creating dynamic user lists. For more example expressions, see Example Dynamic User List Expressions.

Single Member in Expression

This expression returns Customer Sold-To members with values greater than 150280. You can adjust the filter quickly to return different results by changing out the > symbol in the expression for other symbols (such as <) or by changing the "150280" in the expression to a different value.

[Customer Sold-To].[Customer Sold-To].CurrentMember.Name > "150280"

Multiple Members in Expression

This expression filter returns Customer Sold-To members in a range that is greater than or equal to 150280 and less than or equal to 150350.

[Customer Sold-To].[Customer Sold-To].CurrentMember.Name >= "150280" AND [Customer Sold-To].[Customer Sold-To].CurrentMember.Name <= "150350"

Attribute Relationships in Expression

This filter returns Product Category members that have the text 'fruit' in their PCat Long Description attribute relationship.

(INSTR(1, [Product Category].[Product Category].CurrentMember.Properties("PCat Long Description"), "Fruit") <> 0)