Passa al contenuto principale

Table.FromPartitions

Restituisce una tabella che rappresenta il risultato della combinazione di un set di tabelle partizionate.

Syntax​

Table.FromPartitions(
partitionColumn as text,
partitions as list,
optional partitionColumnType as type
) as table

Remarks​

Restituisce una tabella che è il risultato della combinazione di un set di tabelle partizionate, partitions. partitionColumn è il nome della colonna da aggiungere. Il tipo predefinito di colonna è any, ma può essere specificato da partitionColumnType.

Examples​

Example #1​

Trovare il tipo di elemento dall'elenco {number}.

Table.FromPartitions(
"Year",
{
{
1994,
Table.FromPartitions(
"Month",
{
{
"Jan",
Table.FromPartitions(
"Day",
{
{1, #table({"Foo"}, {{"Bar"}})},
{2, #table({"Foo"}, {{"Bar"}})}
}
)
},
{
"Feb",
Table.FromPartitions(
"Day",
{
{3, #table({"Foo"}, {{"Bar"}})},
{4, #table({"Foo"}, {{"Bar"}})}
}
)
}
}
)
}
}
)

Result:

Table.FromRecords({
[
Foo = "Bar",
Day = 1,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 2,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 3,
Month = "Feb",
Year = 1994
],
[
Foo = "Bar",
Day = 4,
Month = "Feb",
Year = 1994
]
})

Category​

Table.Row operations