OpenBI Docs Buy

List.Transform

A new list with a function applied to each item.

Group: List. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

List.Transform(list as list, transform as function) as list
ParameterTypeDescription
listlistThe items to change.
transformfunctionA function of one item that gives the new value.

Returns

list. As many items as the list, each the function's answer.

Examples

Prices with 25 % VAT

List.Transform({100, 250, 80}, each _ * 1.25)
{125, 312.5, 100}

City names in proper case

List.Transform({"oslo", "BERGEN"}, Text.Proper)
{"Oslo", "Bergen"}

List.TransformMany, List.Accumulate, Table.TransformColumns.

Last updated · OpenBI Studio 0.3.79