TEXTSIMILARITY DAX Function (Information)
Returns a relevance score (BM25) indicating how well the text in the column matches the search text. Higher scores mean greater relevance.
Syntax
| 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
A floating-point lexical relevance score. Within one evaluation, a higher score indicates a stronger match, and 0 indicates no match.
The score is an opaque ranking value, not a percentage, probability, or normalized similarity measure. Compare scores only within the same search context.
Scores aren’t guaranteed to be comparable or stable across separate query executions, search strings, columns, filter contexts, data sources or storage modes, index contents or generations, or execution plans. These factors can change the scoring corpus or scoring implementation even when visible text values are unchanged.
Remarks
MatchMode:
| Mode | Behavior |
|---|---|
TEXTMATCHING |
Tokenizes search_text and scores text that matches any search token. |
FUZZYMATCHING |
Scores tokens that are similar to search tokens within a small edit distance. This mode supports typo-tolerant matching. |
PHRASEMATCHING |
Scores text when the analyzed tokens 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/textsimilarity-function-dax