Text.Contains

This function identifies if a text includes a specific value within it. It will return true if the value is located. Please note that this function does not work with wildcards or regular expressions....

Syntax

Text.Contains(text as nullable text, substring as text, optional comparer as nullable function) as nullable logical

About

This function identifies if a text includes a specific value within it. It will return true if the value is located. Please note that this function does not work with wildcards or regular expressions. You can use the optional comparer argument to indicate whether the comparison should be case-insensitive or culture and locale-aware. In the formula language, the following built-in comparers are available: - Comparer.Ordinal: Performs a case-sensitive ordinal comparison - Comparer.OrdinalIgnoreCase: Performs a case-insensitive ordinal comparison - Comparer.FromCulture: Performs a culture-aware comparison.

Explanation

Determine if the text "Hello World" includes the word "Hello". To do this, use the MText.Contains function in Power Query with the parameters ("Hello World", "Hello"). Output: true Next, check if the text "Hello World" contains the word "hello". Use the MText.Contains function in Power Query with the parameters ("Hello World", "hello"). Output: false Lastly, check if the text "Hello World" contains the word "hello" while ignoring the case of the letters. Use the MText.Contains function in Power Query with the parameters ("Hello World", "hello", Comparer.OrdinalIgnoreCase). Output: true