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 you can use the Replacer.ReplaceValue function by itself, it also works together with:

Other functions related to Replacer.ReplaceValue are:

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

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy