ValueAction.Replace

Updated on

ValueAction.Replace is a Power Query M function that creates an action to replace the content of a target value with a specified new value.

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

Syntax

ValueAction.Replace(
   target as any,
   source as any,
) as any

Description

Creates an action that when executed replaces the content of target with source.

The function raises an evaluation error if target is not updatable or if source is not compatible with target.

The action raises an execution error if the operation fails.

NOTE: target may be left in a partially updated state if an execution error occurs.

Learn more about ValueAction.Replace in the following articles:

  • M Mysteries: The Mysterious Type Action—An M-Internal Means to Write Data Modifications to External Systems
    In his article “M Mysteries: The Mysterious Type Action,” Ben Gribaudo explores Power Query’s hidden capability to perform data modifications—such as inserts, updates, and deletes—using the undocumented ‘action’ type. Although Power Query is primarily designed for data retrieval and transformation, Gribaudo reveals that it possesses internal functions that can interact with external data sources to modify data. These functions, however, are not intended for general use and require the Power Query SDK for implementation. » Read more

Other functions related to ValueAction.Replace are:

Contribute » | Contributors: Rick de Groot

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