Table.SelectRowsWithErrors
TableReturns rows that contain at least one error value, optionally limited to specified columns.
Syntax
Table.SelectRowsWithErrors(table as table, optional columns as nullable list) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | The table to inspect. |
columns | list | No | Optional list of column names. Only errors in those columns qualify a row. If omitted, all columns are checked. |
Return Value
table — A table containing only rows that have at least one error value.
Remarks
Table.SelectRowsWithErrors is the complement of Table.RemoveRowsWithErrors. It returns only the rows that contain at least one error, useful for auditing and diagnosing data quality issues after import or type conversion steps.
When columns is specified, only errors in those columns cause a row to be included. Errors in other columns are ignored.
Examples
Example 1: Return all rows that contain errors
let
Source = #table({"ID", "Value"}, {{1, 10}, {2, error "bad"}, {3, 30}})
in
Table.SelectRowsWithErrors(Source)Result
ID | Value | |
|---|---|---|
| 1 | 2 | [Error] |
Example 2: Only check a specific column for errors
let
Source = #table({"ID", "Value"}, {{1, error "bad"}, {2, 20}, {3, error "bad"}})
in
Table.SelectRowsWithErrors(Source, {"Value"})Result
ID | Value | |
|---|---|---|
| 1 | 1 | [Error] |
| 2 | 3 | [Error] |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks