Table of contents
TOC
Collapse the table of content
Expand the table of content

Table.ReplaceMatchingRows

Owen Duncan|Last Updated: 4/19/2018

About

Replaces specific rows from a table with the new rows.

Table.ReplaceMatchingRows(table as table, replacements as list, optional equationCriteria as any) as table  

Arguments

ArgumentDescription
tableThe Table to modify.
replacementsThe List of replacement rows.
optional equationCriteriaAn optional value that specifies how to control comparison between the rows of the table.

Remarks

  • Table.ReplaceMatchingRows is similar to List.ReplaceMatchingRows but requires a table as input.

  • The new rows must be compatible with the type of the table .

Example

Table.ReplaceMatchingRows(  

Table.FromRecords(  

{  

 [Column1 = 1, Column2 = 2],  

 [Column1 = 2, Column2 = 3],  

 [Column1 = 3, Column2 = 4],  

 [Column1 = 1, Column2 = 2]  

}),{  

{[Column1 = 1, Column2 = 2],  

 [Column1 = -1, Column2 = -2]},  

{[Column1  = 2, Column2 = 3],  

 [Column1  = -2, Column2 = -3]} })  
Column1Column2
-1-2
-2-3
34
-1-2
© 2018 Microsoft