TEXTCONTAINS DAX Function (Information)

Returns TRUE if the text in the column matches the search text using full-text query semantics.

Syntax

TEXTCONTAINS ( <WithinTextColumn>, <SearchText> [, <MatchMode>] )
Parameter Attributes Description
WithinTextColumn

A column that contains text values to be searched.

SearchText

A text string that defines the search condition.

MatchMode Optional

An optional enumeration that defines the match mode: TEXTMATCHING (default), FUZZYMATCHING, or PHRASEMATCHING.

Return values

Scalar A single boolean value.

TRUE if the text in within_text_column matches search_text according to match_mode; otherwise, FALSE.

Remarks

Use of MatchMode:

Mode Behavior
TEXTMATCHING Tokenizes search_text and matches text that contains any of the search terms.
FUZZYMATCHING Matches tokens that are similar to search tokens within a small edit distance, which supports typo-tolerant matching.
PHRASEMATCHING Matches analyzed tokens that appear next to each other and in the specified order. Punctuation doesn’t affect the token sequence.

Related functions

Other related functions are:

Last update: Oct 11, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/textcontains-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of TEXTCONTAINS? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA.