Returns `true` if the field or expression ends with the specified text; otherwise, returns `false`.

## Sample usage

`ENDS_WITH(Campaign, "Sale")`

## Syntax

`ENDS_WITH( X, text )`

### Parameters

- `X` - a field or expression of any type.
- `text` - the text to find within X. `text` can be a field, an expression, or a literal value. `text` is case-sensitive.

## Examples

| Example formula | Input | Output |
|---|---|---|
| ` ENDS_WITH(Campaign, "Sale") ` | Summer Sale | true |
| ` ENDS_WITH(Campaign, "Summer") ` | Summer Sale | false |

## Related resources

- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)