Search notes:
Power Query M formula language, primitive types: list
A
list can be thought of an array of elements whose
types can be different. These elements are denoted by curly braces
{ … }
.
{
42,
"Hello world",
#date(2021, 4, 11)
}
Note that Excel for a reason chooses to display the date type as number rather than formatted as date.
Sequences
..
generates a sequence of numbers:
{
5,
10 .. 13,
18
}
This produces:
Get n-th element from a list
If L
is a list, the expression L{n}
gets the (zero based) n-th element from that list.
The following example evaluates to "two"
:
{ "zero", "one", "two", "three", "four", "five"}{ 2 }
See also
A set of elements that is indexed by names rather than position is a
record.
Tables can be thought of list of lists (but with additional features).