TableAction.UpdateRows

Updated on

TableAction.UpdateRows is a Power Query M function that creates an action to update rows in a table based on a set of operations. The action returns a table containing the updated rows after the action executes.

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

Syntax

TableAction.UpdateRows(
   table as table,
   columnUpdates as list,
) as any

Description

Creates an action to update the rows in table based on the set of operations in columnUpdates. The action returns a table containing the updated rows as they appear in table after the action executes.

The value of columnUpdates may be a single {columnName, columnFunction} pair or a list of such pairs. For each pair, the columnFunction is the function to apply to a row to compute the new value for the columnName column for that row.

To update a subset of the rows in table, use Table.SelectRows to apply a filter to table before using TableAction.UpdateRows.

The function raises an evaluation error if table is not updatable or if any of the operations in columnUpdates are incompatible with table.

The action raises an execution error if the operation fails.

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

Other functions related to TableAction.UpdateRows are:

Contribute » | Contributors: Rick de Groot