Table.SelectRowsWithErrors Function in Power Query
The Table.SelectRowsWithErrors function returns a table with only the rows from table that contain an error in at least one of the cells in a row. If a columns list is specified, then only the cells in the specified columns are inspected for errors.
Syntax
Table.SelectRowsWithErrors(table as table, optional columns as nullable list) as table
Example: Select the rows which has error in their any of the columns.
Power Query M
let
MyTable = Table.FromRecords(
{
[CustomerID = 1, Name = "Ashish", Marks = 568],
[CustomerID = 2, Name = "Katrina", Marks = 855],
[CustomerID = 3, Name = Alia, Marks = 456],
[CustomerID = 4, Name = "Vicky", Marks = 458],
[CustomerID = 5, Name = "Mohini", Marks = 656],
[CustomerID = 6, Name = "Meenakshi", Marks = 289],
[CustomerID = 7, Name = "Esha", Marks = 875],
[CustomerID = 8, Name = Anjali, Marks = 380]
}
),
Return = Table.SelectRowsWithErrors(MyTable)
in
Return The output of the above code is shown in the image below:
