List.Zip
Several lists read side by side: a list per position, holding each list's item at that position.
Group: List. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
List.Zip(lists as list) as list
| Parameter | Type | Description |
|---|---|---|
lists | list | A list of lists. |
Returns
list. A list of lists, as long as the longest list.
Remarks
- A shorter list gives null where it has run out.
Examples
Products with their prices
List.Zip({{"Coffee", "Tea"}, {12.5, 8}})
{{"Coffee", 12.5}, {"Tea", 8}}
A price missing
List.Zip({{"Coffee", "Tea", "Milk"}, {12.5, 8}})
{{"Coffee", 12.5}, {"Tea", 8}, {"Milk", null}}