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
| Parameter | Type | Description |
|---|---|---|
list | list | The items. |
collectionTransform | function | A function of one item that gives a list for it. |
resultTransform | function | A 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"}