Matches
MATCHES and NOT MATCHES are Mondrian-specific functions that compare a string with a regular expression or another string expression. For example, compare the dimension member name with the specific string.
Syntax
String_Expression MATCHES Regular_expression
Arguments
String_Expression | any string (including regular_expressions) |
---|---|
Regular_expression | pattern that the regular expression engine attempts to match in the input text |
Examples
Returns True if the particular member from "Week day" dimension has a name that matches Saturday or Sunday
[Week Day].CurrentHierarchyMember.Name NOT MATCHES "Saturday|Sunday"
Returns True if the particular user from Assignee in the report has a name that does not start with John (incl. JOHN, john, etc). Note, that NOT can be used also at the beginning.
NOT [Assignee].CurrentHierarchyMember.Name MATCHES "^(?i)john.*"
Counts filtered set of issues from the "Issue" dimension at the "issue" level, where the property "Issue labels" matches the string "test"
Count( Filter( DescendantsSet([Issue].CurrentHierarchyMember, [Issue].[Issue]), [Measures].[Issue labels] MATCHES '.*test.*' ) )
See also
- Function DescendantsSet() to descend into another dimension
- Function Filter() to filter set of issues