OpenBI Docs Buy

List.TransformMany

Each item expanded into several, then each pair of item and new value turned into one result.

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

Syntax

List.TransformMany(list as list, collectionTransform as function, resultTransform as function) as list
ParameterTypeDescription
listlistThe items.
collectionTransformfunctionA function of one item that gives a list for it.
resultTransformfunctionA function of the item and one value of its list, (item, value) => ..., that gives one result.

Returns

list. All the results, item by item, then value by value.

Examples

Every product in every size

List.TransformMany({"Shirt", "Cap"}, each {"S", "M"}, (product, size) => product & "-" & size)
{"Shirt-S", "Shirt-M", "Cap-S", "Cap-M"}

List.Transform, List.Combine, Table.ExpandListColumn.

Last updated · OpenBI Studio 0.3.79