Table.RemoveRowsWithErrors

Updated on

Table.RemoveRowsWithErrors is a Power Query M function that removes rows containing errors in a table, optionally limited to specified columns. The function returns a new table with the error-containing rows removed.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Table.RemoveRowsWithErrors(
   table as table,
   optional columns as nullable list,
) as table

Description

Table.RemoveRowsWithErrors removes rows from the input table that contain errors in at least one cell. If a column list is specified, only those columns are checked for errors.

Examples

Remove error value from first row.

Table.RemoveRowsWithErrors( 
    Table.FromRecords( {
        [Column1 = ...],
        [Column1 = 2],
        [Column1 = 3]
    } )
 )

 /* Output: 
Table.FromRecords( {
    [Column1 = 2],
    [Column1 = 3]
} )
 */ 

Other functions related to Table.RemoveRowsWithErrors are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-removerowswitherrors