CONTAINSSTRINGEXACT
Whether a text contains another, case counting.
Group: Text. Compatible with DAX.
Syntax
CONTAINSSTRINGEXACT ( <within_text>, <find_text> )
| Parameter | Type | Description |
|---|---|---|
within_text | Text | The text to look in. |
find_text | Text | What to look for, character for character. |
Returns
Boolean. TRUE when the text holds exactly what is looked for, FALSE when not.
Remarks
- Upper and lower case count: Plant is not found in Bergen plant.
- There are no wildcards:
*and?are looked for as they are. - Looking for an empty text always gives TRUE, even in an empty text.
- To find text without regard to case, use
CONTAINSSTRING; for its position,FIND.
Examples
Case counts
EVALUATE
ROW (
"Small p", CONTAINSSTRINGEXACT ( "Bergen plant", "plant" ),
"Capital P", CONTAINSSTRINGEXACT ( "Bergen plant", "Plant" ),
"B*", CONTAINSSTRINGEXACT ( "Bergen plant", "B*" )
)
| Small p | Capital P | B* |
|---|---|---|
| TRUE | FALSE | FALSE |
Companies with Example in their name
EVALUATE
FILTER ( Companies, CONTAINSSTRINGEXACT ( Companies[Company], "Example" ) )
ORDER BY Companies[Key]
| Companies[Key] | Companies[Parent] | Companies[Company] |
|---|---|---|
| 1 | (blank) | Example Brewery Group |
| 30 | 1 | Example Brewery Holding |