Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
siva_powerbi
Helper IV
Helper IV

Table.ReplaceMatchingRows not working as expected

I have a requirement to replace multiple values of a multiple columns in a table, like 

 

Order        Item             Qty          Serial

123 
1111
1313
1113

 

Need to replace rows 1 for Order and 1 and 3 of Seria

 

I choose to use the Table.ReplaceMatchingRows function but unfortunately function doesn't return the required output neither throws error. Statement I am using

 

Table.ReplaceMatchingRows(#"Renamed Columns",{{[Order = 1],[Order = 0]}})

 

Above statement didn't throw any error neither it replace values to 0, above statement is a example one as I get the columns to be replace dynamically through parameters.

 

Thanks

Siva

 

 

1 ACCEPTED SOLUTION
smpa01
Community Champion
Community Champion

@siva_powerbi  that is because you did not provide the record for the whole row to be replaced

Table.ReplaceMatchingRows( #"Changed Type",{{[order = 1,item=1,quantity=1,serial=1],[order = 0,item=1,quantity=1,serial=1]}})

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

2 REPLIES 2
smpa01
Community Champion
Community Champion

@siva_powerbi  that is because you did not provide the record for the whole row to be replaced

Table.ReplaceMatchingRows( #"Changed Type",{{[order = 1,item=1,quantity=1,serial=1],[order = 0,item=1,quantity=1,serial=1]}})

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thanks for the solution its working but my requirement is dynamic is their any way that we can replace all values in column with out matching and not using the table.replacevalues.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.