Text.EndsWith

This indicates if the provided text ends with a specific value or substring. The comparison is sensitive to letter case. The comparer used controls the comparison. Comparers can adjust the comparison ...

Syntax

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

About

This indicates if the provided text ends with a specific value or substring. The comparison is sensitive to letter case. The comparer used controls the comparison. Comparers can adjust the comparison to be case-insensitive or sensitive to culture and locale. In the formula language, there are various built-in comparers available: - Comparer.Ordinal: Used for exact ordinal comparison - Comparer.OrdinalIgnoreCase: Used for exact ordinal case-insensitive comparison - Comparer.FromCulture: Used for culture-aware comparison

Explanation

Determine if the text "Hello, World" concludes with the word "world" by using the Power Query M function Text.EndsWith. If the function Text.EndsWith("Hello, World", "world") outputs false, it means "Hello, World" does not end with "world". On the other hand, if the function Text.EndsWith("Hello, World", "World") outputs true, it means "Hello, World" ends with "World".