Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all, I'm trying to replace some incorrect values in column A based on the values in column B. Essentially, I would like to change all of the values in Column A to "127" IF Column B = "table" without adding a new column.
I've tried to use the Replacer.ReplaceText and Table.ReplaceValue functions but can't seem to get it right. Appreciate the help
Current table
| Column A | Column B |
| 124 | table |
| 124 | table |
| 125 | table |
Desired table
| Column A | Column B |
| 127 | table |
| 127 | table |
| 127 | table |
Solved! Go to Solution.
Using → https://www.biinsight.com/quick-tips-conditionally-replace-values-based-on-other-values-in-power-que... as an example
Table.ReplaceValue(#"Changed Type", each [Column A], each if [Column B] = "table" then 127 else [Column A], Replacer.ReplaceValue,{"Column A"})
Proud to be a Super User!
= Table.AddColumn(#"Changed Type", "Custom", each if [Column B] = "table" then Replacer.ReplaceValue([Column A],[Column A],127) else [Column A])
Proud to be a Super User!
Hey @ChrisMendoza, I appreciate the help here. However I'd like to find out a solution that does not require adding a new column. Thanks!
Using → https://www.biinsight.com/quick-tips-conditionally-replace-values-based-on-other-values-in-power-que... as an example
Table.ReplaceValue(#"Changed Type", each [Column A], each if [Column B] = "table" then 127 else [Column A], Replacer.ReplaceValue,{"Column A"})
Proud to be a Super User!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 134 | |
| 111 | |
| 50 | |
| 31 | |
| 29 |