MicroStrategy ONE
EndsWith
Returns 1
if a text string ends with a specified text pattern. If the text string does not end with the pattern, the function returns 0
.
For the definition and syntax of the Ends With comparison operator, see Ends With.
Syntax
EndsWith(
String
,
Pattern
)
Where:
String
is the string that is being searched. You can use facts, metrics, columns, or string values.Pattern
is the string that is being searched for at the end of the values fromString
. You can use facts, metrics, columns, or string values.
Example
EndsWith ([Unit Price], ".99")
Returns 1 for prices that end in .99, such as 10.99, 11.99, and so on.
If String
is an attribute form, the EndsWith function can only be used to create attributes, not metrics. If you use an expression similar to the one below to create a new metric, you receive an error message.
EndsWith(Employee@[Last Name], "son")