Text.EndsWith
TextReturns true if a text value ends with a specified substring.
Syntax
Text.EndsWith(text as nullable text, substring as text, optional comparer as nullable function) as nullable logicalParameters
| Name | Type | Required | Description |
|---|---|---|---|
text | text | Yes | The text value to check. |
substring | text | Yes | The substring to match at the end. |
comparer | function | No | A comparer function to control case sensitivity. |
Return Value
logical — true if the text ends with the substring, false otherwise.
Remarks
Text.EndsWith checks whether a text value ends with a given substring. Like Text.Contains, the comparison is case-sensitive by default.
Examples
Example 1: Filter log entries ending with "express"
Table.SelectColumns(
Table.SelectRows(OrderLog, each Text.EndsWith([Notes], "express")),
{"LogID", "OrderID", "Notes"}
)Result
LogID | OrderID | Notes | |
|---|---|---|---|
| 1 | L002 | 1 | Shipped via express |
| 2 | L008 | 4 | Shipped via express |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks