FIND DAX Function in Power BI

The FIND DAX function returns the number which specifies the starting position of substring within another text string. Please note, the FIND function is case-sensitive. Use the SEARCH function for case-insensitive.

DAX Syntax FIND(find_text, within_text[, [start_num][, NotFoundValue]])

The function has the following parameters: • find_text: The text we want to find. Use double quotes (empty text) to match the first character in within_text. • within_text: The text containing the text we want to find. • start_num (optional): The character at which to start the search; if omitted, start_num = 1. The first character in within_text is character number 1. • NotFoundValue (optional, but strongly recommended): The value that should be returned when the operation does not find a matching substring, typically 0, -1, or BLANK(). If not specified, an error is returned.

Example: Let’s create a measure with name “Find Measure”.

DAX

Find Measure = FIND("Dea", "My Dear Ashish!")

The output of above dax function is shown below:

FIND dax function in Power BI

Please note that the FIND function is case-sensitive, and we have not given any optional result. So, it returns an error if the text is not found in the given text.

DAX

Find Measure = FIND("dea", "My Dear Ashish!")

The output of above dax function is shown below:

FIND dax function in Power BI

Now we have specified the optional parameter for the FIND function if the text is not found. Here, we have given Blank() which return Blank in the output.

DAX

Find Measure = FIND("dea", "My Dear Ashish!",1, Blank())

The output of above dax function is shown below:

FIND dax function in Power BI