Overview
Grammar | ENDWITH(str1, str2) | Determines whether str1 ends with str2. |
Parameter 1 | str1 | Character string |
Parameter 2 | str2 | Character string |
Notes
Both str1 and str2 are case-sensitive.
The function supports any two parameters.
The ENDWITH function can only read texts.
Example
For example, if you want to determine whether the strings in the province column end with "Autonomous Region", you can enter the formula ENDWITH(Province,"Autonomous Region"), as shown in the following figure.
Drag the field "Province" into Dimensions and "Autonomous Region or Not" into Indicators. The function returns 1 for autonomous regions and returns 0 otherwise, as shown in the following figure.
More examples:
Formula | Result | Notes |
---|---|---|
ENDWITH("FineReport","Report") | 1 | - |
ENDWITH("FineReport","Fine") | 0 | - |
ENDWITH("FineReport","report") | 0 | - |