List.Buffer
A list worked out once and kept in memory, so later steps read the same values without working them out again.
Group: List. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
List.Buffer(list as list) as list
| Parameter | Type | Description |
|---|---|---|
list | list | The list to keep. |
Returns
list. The same items.
Remarks
- Worth it when a list is read many times, for example inside a function called once per row.
Examples
Price list kept for a lookup
let prices = List.Buffer({12.5, 8, 23}) in List.Max(prices) - List.Min(prices)
15