Replacer.ReplaceValue
ReplacerA replacer function that performs exact match replacement of entire cell values.
Syntax
Replacer.ReplaceValue as functionReturn Value
function — A replacer function that replaces a cell value only when it exactly matches the old value.
Remarks
Replacer.ReplaceValue is a built-in replacer function used as an argument to Table.ReplaceValue. It performs exact match replacement — the entire cell value must equal oldValue for the replacement to occur.
Key difference from Replacer.ReplaceText: Replacer.ReplaceValue matches and replaces the whole cell value, while Replacer.ReplaceText performs substring replacement within text values. Use Replacer.ReplaceValue when replacing nulls, numbers, or exact text matches. Use Replacer.ReplaceText for find-and-replace within strings.
Examples
Example 1: Replace exact region values
Table.SelectColumns(
Table.ReplaceValue(
Table.FirstN(Sales, 4),
"West", "Western",
Replacer.ReplaceValue, {"Region"}
),
{"CustomerName", "Product", "Region"}
)Result
CustomerName | Product | Region | |
|---|---|---|---|
| 1 | Alice | Widget A | East |
| 2 | Bob | Gadget B | Western |
| 3 | Charlie | Widget C | East |
| 4 | Alice | Gadget D | North |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks