Skip to main content

 What is the difference between search and find?

Table of Contents

In Power BI/DAX, both the SEARCH and FIND functions are used to locate a substring within a text string and return the position of its first occurrence. However, they differ in their behavior.

SEARCH Function:

  • It is important to remember that SEARCH is case-insensitive, which means it does not take into account whether the characters in the text or the search substring are in uppercase or lowercase.
  • It returns the position of the first occurrence of the search substring within the text, starting from 1 as the first character’s position.
  • Search supports wildcards

Example:

Example: with not found value and table column

Example: with wildcard

FIND Function:

The FIND function is case-sensitive, meaning it takes the character’s case into account during the search. It returns the position of the first occurrence of the search substring within the text, with the first character’s position starting at 1. If the substring is not found, FIND returns an error. Additionally, FIND does not support wildcards.

Example:

The difference between the two functions lies in wildcard support and the case sensitivity it offers. When you need a search that is not case-sensitive, you will normally use SEARCH; for a case-sensitive search, use FIND.

Add comment