SEARCH DAX Function (Text)

Returns the starting position of one text string within another text string. SEARCH is not case-sensitive, but it is accent-sensitive.


SEARCH ( <FindText>, <WithinText> [, <StartPosition>] [, <NotFoundValue>] )
Parameter Attributes Description

The text you want to find. You can use the ? and * wildcard characters; use ~? and ~* to find the ? and * characters.


The text in which you want to search for FindText.

StartPosition Optional

The character position in WithinText at which you want to start searching. If omitted, the default value is 1.

NotFoundValue Optional

The numeric value to be returned if the text is not found; if omitted, an error is returned.

Return values

Scalar A single integer value.

The number of the starting position of the first text string from the first character of the second text string.


SEARCH supports wildcards, whereas FIND does not.

Related articles

Learn more about SEARCH in the following articles:

Related functions

Other related functions are:

Last update: Nov 20, 2020   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Jes Hansen

MSDN documentation:

Cyber Monday
2018-2020 © SQLBI. All rights are reserved. Information coming from MSDN 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.


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.


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


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.


Want to improve the content of SEARCH? 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 and the Google Privacy Policy and Terms of Service apply.