Replacer.ReplaceValue

Updated on

Replacer.ReplaceValue is a Power Query M function that replaces the old value in the original value with the new value. The function returns a replacer function for use in List.ReplaceValue and Table.ReplaceValue.

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

Syntax

Replacer.ReplaceValue(
   value as any,
   old as any,
   new as any,
) as any

Description

Replaces the old value in the original value with the new value. This replacer function can be used in List.ReplaceValue and Table.ReplaceValue.

Examples

Replace the value 11 with the value 10.

// Output: 10
Replacer.ReplaceValue( 11, 11, 10 )

Used by

While the Replacer.ReplaceValue function can be used on its own, it is also used by the following functions:

Other functions related to Replacer.ReplaceValue are:

BI Gorilla Youtube Channel

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